[R-sig-ME] Extracting Random Effects and Variances of Each Group from the Poisson Model
Hans Ekbrand
hans.ekbrand at gmail.com
Wed Aug 28 00:14:00 CEST 2013
On Tue, Aug 27, 2013 at 05:02:06PM -0500, Lijun Chen wrote:
> To get the predicted result for each county, I need to get the random
> effect (residuals) for each county as well as their variances. However,
> the ranef command only produce the random effect without giving the
> confidence interval / variance. I would be glad if you can let me know
> how to produce the confidence interval of these random effects so I can
> calculate their confidence intervals.
> > ranef(fit2)
Have you tried
dotplot(ranef(fit2, postVar = TRUE))
and
attr(ranef(fit2, postVar = TRUE)[[1]], "postVar")
?
More information about the R-sig-mixed-models
mailing list