[R-sig-ME] Random Effect Variance of Zero
Kevin E. Thorpe
kevin.thorpe at utoronto.ca
Thu Mar 21 19:23:34 CET 2013
Hello.
I'm posting this for a colleague since I subscribe to this list. He fit
a lme4::lmer model on a data set and got a variance of zero on the RE
intercept. He fit what appears to be the same model with nlme::lme and
obtained a non-zero value for the same terms.
I re-ran on my system, since I just updated this week and here are my
results. If requested, I will send the data off-list.
Any idea why this happens or how to make it not happen?
Many thanks.
=== lme4::lmer ===
> lmer(zbmi ~ (1|DA) , data = ra.subset)
Linear mixed model fit by REML ['lmerMod']
Formula: zbmi ~ (1 | DA)
Data: ra.subset
REML criterion at convergence: 10474.66
Random effects:
Groups Name Variance Std.Dev.
DA (Intercept) 0.000 0.000
Residual 1.129 1.063
Number of obs: 3538, groups: DA, 1603
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.15347 0.01787 8.591
> sessionInfo()
R version 2.15.3 Patched (2013-03-13 r62256)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US LC_NUMERIC=C LC_TIME=en_US
[4] LC_COLLATE=C LC_MONETARY=en_US LC_MESSAGES=en_US
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lme4_0.999902345-0 Matrix_1.0-11 lattice_0.20-14
loaded via a namespace (and not attached):
[1] MASS_7.3-23 grid_2.15.3 minqa_1.2.1 nlme_3.1-108
splines_2.15.3
[6] tools_2.15.3
=== nlme::lme ===
> lme(zbmi ~ 1 , data = ra.subset, random = ~ 1 | DA,na.action=na.omit)
Linear mixed-effects model fit by REML
Data: ra.subset
Log-restricted-likelihood: -5236.905
Fixed: zbmi ~ 1
(Intercept)
0.1537825
Random effects:
Formula: ~1 | DA
(Intercept) Residual
StdDev: 0.1564781 1.051139
Number of Observations: 3538
Number of Groups: 1603
> sessionInfo()
R version 2.15.3 Patched (2013-03-13 r62256)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US LC_NUMERIC=C LC_TIME=en_US
[4] LC_COLLATE=C LC_MONETARY=en_US LC_MESSAGES=en_US
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] nlme_3.1-108
loaded via a namespace (and not attached):
[1] grid_2.15.3 lattice_0.20-14
--
Kevin E. Thorpe
Head of Biostatistics, Applied Health Research Centre (AHRC)
Li Ka Shing Knowledge Institute of St. Michael's
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016
More information about the R-sig-mixed-models
mailing list