[R] getting parts returned by lmer

John Sorkin jsorkin at grecc.umaryland.edu
Mon May 3 15:41:10 CEST 2010

R 2.10.0
windows XP

I am trying to get the coefficients returned from lmer. Normally I would use the names function to get the objects returned by the function. This does not work in lmer, but it does for lm:

 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy)
> names(fm2)

> fitlm <- lm(Reaction ~ Days, sleepstudy)
> names(fitlm)
 [1] "coefficients"  "residuals"     "effects"       "rank"         
 [5] "fitted.values" "assign"        "qr"            "df.residual"  
 [9] "xlevels"       "call"          "terms"         "model" 

How does one know what is returned by lmer, and how does one access the various parts? I looked at the code for lmer, but at least on my level of R sophistication, the nature of the data returned in not clear.


John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)

Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:6}}

More information about the R-help mailing list