I am having difficulty finding the covariance for the random effects in a mixed effects model. I fit this model: fm1 <- lmer(fpg ~ 1 + time + (1|ID) + (0+time|ID),fpg_lme)
and want to find the covariance between the time and intercept random effects. I tried using VarCorr (see below) but it does not give the covariance or correlation between the random effects. Am I doing something wrong? Thanks, Kurt > summary(fm1) Linear mixed model fit by REML Formula: fpg ~ 1 + time + (1 | ID) + (0 + time | ID) Data: fpg_lme AIC BIC logLik deviance REMLdev 1499289 1499339 -749639 1499259 1499279 Random effects: Groups Name Variance Std.Dev. ID (Intercept) 1.0396e+03 32.2435465 ID time 1.2199e-05 0.0034926 Residual 1.1241e+02 10.6025764 Number of obs: 174042, groups: ID, 55526 Fixed effects: Estimate Std. Error t value (Intercept) 1.108e+02 1.421e-01 779.9 time 2.106e-03 6.678e-05 31.5 Correlation of Fixed Effects: (Intr) time -0.163 > VarCorr(fm1) $ID (Intercept) (Intercept) 1039.646 attr(,"stddev") (Intercept) 32.24355 attr(,"correlation") (Intercept) (Intercept) 1 $ID time time 1.219857e-05 attr(,"stddev") time 0.003492645 attr(,"correlation") time time 1 attr(,"sc") sigmaREML 10.60258 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.