I've been running some mixed models in lmer and lme and I've found that in some 
models lmer estimates essentially a zero variance for a random effect while lme 
estimates a variance greater than zero.  Everything else (parameter estimates, 
etc.) looks essentially the same.  Can someone help explain this? Is there 
something differently I should be doing in lmer?  


Thanks,
Beth

Here's a simple sample with an attached dataset:

> options(contrasts = c(factor = "contr.SAS", ordered = "contr.poly"))
> lightclass <- factor(daphnia$light)
> trial <-  factor(daphnia$trial)
> mode1 <- lme(rxndist ~ lightclass, random=~1|trial, daphnia, method='ML')
> mode2 <- lmer(rxndist ~ lightclass + (1|trial), daphnia, REML=FALSE)
> summary(mode1)

Linear mixed-effects model fit by maximum likelihood
 Data: daphnia 
       AIC      BIC    logLik
  906.2407 933.3897 -445.1204

Random effects:
 Formula: ~1 | trial
        (Intercept) Residual
StdDev:   0.3537305 1.798685

Fixed effects: rxndist ~ lightclass 
                  Value Std.Error  DF   t-value p-value
(Intercept)    8.135043 0.3339863 184 24.357417  0.0000
lightclass0.4 -1.962831 0.4885078  30 -4.018014  0.0004
lightclass2.5 -0.437404 0.4701776  30 -0.930295  0.3596
lightclass8   -0.337171 0.4699891  30 -0.717402  0.4787
lightclass55  -0.645143 0.4723279  30 -1.365879  0.1821
lightclass340 -0.318462 0.4721642  30 -0.674474  0.5052
 
Correlation: 
              (Intr) lgh0.4 lgh2.5 lghtc8 lght55
lightclass0.4 -0.684                            
lightclass2.5 -0.710  0.486                     
lightclass8   -0.711  0.486  0.505               
lightclass55  -0.707  0.483  0.502  0.502       
lightclass340 -0.707  0.484  0.502  0.503  0.500

Standardized Within-Group Residuals:
        Min          Q1         Med          Q3         Max 
-2.67901366 -0.65013679 -0.03988684  0.71632236  2.24293567 

Number of Observations: 220
Number of Groups: 36 

> summary(mode2)
Linear mixed model fit by maximum likelihood 
Formula: rxndist ~ lightclass + (1 | trial) 
   Data: daphnia 
 AIC   BIC logLik deviance REMLdev
 907 934.1 -445.5      891   894.2
Random effects:
 Groups   Name        Variance   Std.Dev.  
 trial    (Intercept) 9.2927e-10 3.0484e-05
 Residual             3.3602e+00 1.8331e+00
Number of obs: 220, groups: trial, 36

Fixed effects:
              Estimate Std. Error t value
(Intercept)     8.1314     0.3014  26.983
lightclass0.4  -1.9910     0.4389  -4.536
lightclass2.5  -0.4338     0.4234  -1.025
lightclass8    -0.3455     0.4234  -0.816
lightclass55   -0.6339     0.4262  -1.487
lightclass340  -0.3128     0.4262  -0.734

Correlation of Fixed Effects:
            (Intr) lgh0.4 lgh2.5 lghtc8 lght55
lghtclss0.4 -0.687                            
lghtclss2.5 -0.712  0.489                     
lightclass8 -0.712  0.489  0.507              
lightclss55 -0.707  0.486  0.503  0.503       
lghtclss340 -0.707  0.486  0.503  0.503  0.500


Data:
trial  light rxndist
716074  0.4 4.937837185
716074  0.4 5.382107025
716074  0.4 6.758872863
716074  0.4 6.932817149
716074  0.4 8.609051954
717071  0.4 7.041730658
717072  0.4 7.344602718
717072  0.4 4.230307248
717072  0.4 4.858256646
717072  0.4 5.601924578
717072  0.4 4.983833222
717072  0.4 3.725039674
717072  0.4 4.430084004
717072  0.4 4.241748642
717073  0.4 6.903760137
717073  0.4 6.658826919
717073  0.4 9.090883912
717073  0.4 7.515741963
717073  0.4 4.762265074
717073  0.4 5.467479527
717073  0.4  6.806651734
717073  0.4 8.933571404
717074  0.4 6.692405199
717074  0.4 5.973645264
717074  0.4 4.914615715
717074  0.4 5.977202569
717074  0.4 6.716680391
717074  0.4 4.298327141
717074  0.4 7.173302229
717074  0.4 3.39800087
718071  0.4 6.728772677
718071  0.4 7.078461034
718071  0.4 8.465609048
716071  2.5 7.773937614
716071  2.5 10.92533686
716071  2.5 7.041730658
716071  2.5 9.024790611
716071  2.5 9.790661034
716071  2.5 7.261009415
716071  2.5 6.689362241
716072  2.5 7.771463545
716072  2.5 10.5565517
716072  2.5 7.373951074
716072  2.5 5.324136871
716073  2.5 6.993295691
716073  2.5 6.853971891
716073  2.5  7.620979732
716073  2.5 9.287226164
716073  2.5 9.494907812
716073  2.5 9.024790611
716073  2.5 6.358525064
718072  2.5 7.341926648
718072  2.5 7.549329519
718072  2.5 10.05898486
718072  2.5 9.088890828
718072  2.5 8.170486184
718072  2.5 2.839593173
718072  2.5 7.541596874
718073  2.5 6.637336606
718073  2.5 3.662836438
718073  2.5 8.988456297
718073  2.5 8.016062684
718073  2.5 5.73958342
718073  2.5 9.176022359
718073  2.5 7.067187451
718074  2.5 6.752867643
718074  2.5 6.800704709
718074  2.5 4.805789033
718074  2.5 10.72808266
718074  2.5 7.200869291
718074  2.5 9.176022359
713071  8 9.576989513
713071  8  11.67490895
713071  8 5.353230312
713071  8 11.01603271
713071  8 9.373736833
713072  8 7.263726738
713072  8 8.976299687
713072  8 4.648462425
713072  8 9.329658676
713072  8 8.11480142
713072  8 7.309708151
713073  8 6.134353138
713073  8 6.525263985
713073  8 5.803030796
713073  8 6.776844466
713073  8 8.734543726
713073  8 6.07216647
718075  8 7.569896623
718075  8 7.973227679
718075  8 9.625039053
718075  8 9.038866201
718075  8 10.410887
718075  8  9.118723976
718076  8 4.587529763
718076  8 9.356523004
718076  8 5.402602969
718076  8 9.110781658
718076  8 9.760015071
718076  8 7.445312651
718076  8 11.86600546
718076  8 5.998485278
719071  8 3.533845638
719071  8 7.661508321
719071  8 8.507245891
719071  8 8.266692986
719071  8 2.849507836
719071  8 8.884390903
719071  8 6.212568688
712072  55 7.951690519
712072  55 7.347277443
712072  55 7.103736362
712072  55 7.41107182
712072  55 4.224570493
712072  55  4.728029454
712073  55 7.751631708
712073  55 6.93571361
712073  55 10.52406036
712073  55 11.17493836
712073  55 4.440821147
712073  55 4.937837185
712074  55 5.118424779
712074  55 5.455396252
712074  55 9.195666256
712074  55 8.793236863
712074  55 5.724513206
712074  55 5.539217571
719072  55 10.27245895
719072  55 10.36613617
719072  55 8.119461974
719072  55 5.59413923
719072  55 8.145029255
719072  55 9.265909163
719072  55 9.096859547
719073  55 9.118723976
719073  55 8.425901052
719073  55 7.389891498
719073  55 6.912494955
719073  55 8.287108489
719073  55 7.33120887
719073  55  6.544127085
720071  55 6.892089918
720071  55 9.325812187
720071  55 8.186629182
720071  55 8.617639744
720071  55 5.157861584
711073  340 5.459428114
711073  340 7.363297632
711073  340 9.314259553
711073  340 8.480981785
711073  340 10.75814765
711073  340 4.997518249
711074  340 5.582433074
711074  340 8.179716142
711074  340 6.061716224
711074  340 6.836279828
711074  340 9.956017829
711074  340 7.333890343
712071  340 9.120708063
712071  340 7.595497482
712071  340 9.881813637
712071  340 11.17343967
712071  340 5.431118174
712071  340 7.200869291
720072  340 9.142493805
720072  340 7.151142784
720072  340  9.337345092
720072  340 9.134580018
720072  340 6.566039568
720072  340 8.96005542
720072  340 6.853971891
720073  340 7.320469411
720073  340 10.80067304
720073  340 4.224570493
720073  340 7.658983956
720073  340 4.791341688
720073  340 7.50016988
720074  340 10.5305697
720074  340 6.212568688
720074  340 8.807825862
720074  340 8.574581882
720074  340 5.336632311
720074  340 9.656277802
710071  1965 5.294822214
710071  1965 6.499995435
710071  1965 6.562915397
710071  1965 5.836236068
710071  1965 6.037235052
710071  1965 5.248298153
711071  1965 7.92043832
711071  1965 9.390907117
711071  1965 11.23763462
711071   1965 8.656139385
711071  1965 8.524693272
711072  1965 9.427013842
711072  1965 7.901121255
711072  1965 7.736711722
711072  1965  7.458424459
711072  1965 9.343104174
711072  1965 9.75459315
720075  1965 7.966057559
720075  1965 6.537847734
720075  1965  11.14039791
720075  1965 6.023184048
720075  1965 11.03130297
720075  1965 4.572120937
720075  1965 10.66760101
723071  1965  8.60260334
723071  1965 7.768988388
723071  1965 8.685920863
723071  1965 5.872827448
723071  1965 8.008945477
723071  1965  10.21669948
723071  1965 7.736711722
723072  1965 5.821510457
723072  1965 7.403139005
723072  1965 10.46194219
723072  1965  7.898702033
723072  1965 10.59858509
723072  1965 11.01603271


      
	[[alternative HTML version deleted]]


