[R] Var-Cov matrix from LMER function

Joshua Wiley jwiley.psych at gmail.com
Mon Aug 8 19:13:24 CEST 2011


Hi Cheryl,

Here is an example of how to get the fixed and random effects
covariance matrices.

require(lme4)
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
## fixed effects
vcov(fm1)
## random effects
VarCorr(fm1)

## for documentation, see
method?vcov("mer")

Hope this helps,

Josh

On Mon, Aug 8, 2011 at 6:06 AM, Cheryl Johnson
<johnson.cheryl625 at gmail.com> wrote:
> Hello,
>
> Is there a way to get the Var-Cov matrix from the LMER function?
>
> Thanks
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, ATS Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/



More information about the R-help mailing list