Andrew Perrin
2002-May-29 20:46 UTC
[R] Extracting intercept and residual std dev from lme results
Greetings- 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$reStructRandom 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Douglas Bates
2002-May-29 21:48 UTC
[R] Extracting intercept and residual std dev from lme results
getVarCov() in nlme_3.1-27 Andrew Perrin <clists at perrin.socsci.unc.edu> writes:> Greetings- > > 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.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._