[R-sig-ME] Why am I getting a Variance of 0 for my random effect

Douglas Bates bates at stat.wisc.edu
Wed Aug 11 21:00:06 CEST 2010


On Wed, Aug 11, 2010 at 1:40 PM, Gustavo Betini <betinig at uoguelph.ca> wrote:
>
>> It's not a bug - it's a feature.  ML estimates or REML estimates of
>> variance components can be zero.  This simply indicates that the
>> variability in the response associated with the factor, RN in your
>> case, is not sufficient to warrant the additional complexity in the
>> model.
>>
>
> does it mean that the correlation between two random effects can be 1 or
> -1?

Yes.  For example,
> data(Early, package="mlmRev")
> Early <- within(Early, tos <- age-0.5)
> fm12 <- lmer(cog ~ tos+trt:tos+(tos|id), Early, verbose=TRUE)
npt = 7 , n =  3
rhobeg =  0.2 , rhoend =  2e-07
   0.020:  11:      2368.50; 1.09296 -0.173139 0.0953204
  0.0020:  30:      2364.50; 1.48770 -0.374305 0.0138819
 0.00020:  42:      2364.50; 1.48462 -0.372458 0.00762182
 2.0e-05:  58:      2364.50; 1.48417 -0.372319 0.00114305
 2.0e-06:  74:      2364.50; 1.48420 -0.372480  0.00000
 2.0e-07:  80:      2364.50; 1.48420 -0.372481  0.00000
At return
 85:     2364.5016:  1.48420 -0.372481 2.77475e-07
> print(fm12, corr=FALSE)
Linear mixed model fit by REML ['merMod']
Formula: cog ~ tos + trt:tos + (tos | id)
   Data: Early
REML criterion at convergence: 2364.502

Random effects:
 Groups   Name        Variance Std.Dev. Corr
 id       (Intercept) 166.40   12.900
          tos          10.48    3.237   -1.000
 Residual              75.54    8.691
Number of obs: 309, groups: id, 103

Fixed effects:
            Estimate Std. Error t value
(Intercept)  120.783      1.824   66.22
tos          -22.470      1.494  -15.04
tos:trtY       7.646      1.447    5.28


The resulting model no longer fulfills the technical definition of a
linear mixed-effects model.




More information about the R-sig-mixed-models mailing list