[R-sig-ME] Bug in mcmcsamp
Jarrod Hadfield
j.hadfield at ed.ac.uk
Sun Aug 12 16:31:12 CEST 2007
Hi,
With version 0.99875-6 I get the posterior variances for A and B both
coming out with a mode around 1.5 (See Hadfield2.pdf)
Cheers,
Jarrod
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Hadfield2.pdf
Type: application/pdf
Size: 337185 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20070812/c24ca3f5/attachment.pdf>
-------------- next part --------------
On 12 Aug 2007, at 15:06, Douglas Bates wrote:
> On 8/12/07, Jarrod Hadfield <j.hadfield at ed.ac.uk> wrote:
>> Hi,
>
>> I'm using lme4 0.99875-6 and I think there may be a bug in mcmcsamp.
>> When I fit 2 random effects, the posterior variances always seem to
>> be approximately the same irrespective of the true variances (or the
>> REML estimates of the true variances). For example:
>
>> A<-gl(100,10)
>> B<-gl(100,1,1000)
>> y<-rnorm(100,0,sqrt(1))[A]+rnorm(100,0,sqrt(3))[B]+rnorm
>> (1000,0,sqrt(3))
>> model1<-lmer(y~(1|A)+(1|B))
>> model1MCMC<-mcmcsamp(model1,n=5000,trans=FALSE)
>> plot(model1MCMC)
>
> Thanks for reporting the problem, Jarrod. I tried your script with
> the development version of lme4 and got the expected results, which I
> enclose Could you try the mcmcsamp.R script in lme4 0.99875-6 and tell
> me if the results are similar?
> <Hadfield.pdf>
> <mcmcsamp.R>
> <mcmcsamp.Rout>
More information about the R-sig-mixed-models
mailing list