[R] Extracting intercept and residual std dev from lme results

Andrew Perrin clists at perrin.socsci.unc.edu
Wed May 29 22:46:35 CEST 2002


I need to extract, programatically, the standard deviations of the
intercept and residuals from an lme model.  These are presented by
print.lme as:

        (Intercept)  Residual
StdDev:    1.410635 0.7800512

(data taken from ?lme's examples section)

I can get the residuals with x$sigma where x is the fitted lme object. I
can't find the intercept, though. The closest I've got is:

> tmp$modelStruct$reStruct     
Random effects:
 Formula: ~1 | ID
        (Intercept) Residual
StdDev:    1.808388        1

which still doesn't give me just the number. I've been looking in the
summary() and print() methods to the structures, but haven't had any luck
in pinpointing where this number is stored and/or calculated. I want to
use these numbers in a further function, so that's why I need access to
them in themselves rather than just in a summary.

Thanks for any advice.

Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists at perrin.socsci.unc.edu * andrew_perrin (at) unc.edu

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list