Dear R-helpers
I am running a simple mixed effects model using lme(). The call looks
like this:
fit <- lme(Analyte~Sample, data=Data, random=~1 | Run)
I am particularly interested in the estimated random effects. When I
print the 'fit' object, it looks something like example below:
(...)
Random effects:
Formula: ~1 | Run
(Intercept) Residual
StdDev: 3.483794 3.637523
(...)
While I have no problem obtaining the 'Residual' value by calling
fit$sigma, I have no idea how to obtain the '(Intercept)' value from the
'fit' object. Anyone can help with that?
Best regards,
--
Michal J. Figurski, PhD
HUP, Pathology & Laboratory Medicine
Biomarker Research Laboratory
3400 Spruce St. 7 Maloney
Philadelphia, PA 19104
tel. (215) 662-3413
Michal Figurski wrote:> > I am running a simple mixed effects model using lme(). The call looks > like this: > fit <- lme(Analyte~Sample, data=Data, random=~1 | Run) > > I am particularly interested in the estimated random effects. When I > print the 'fit' object, it looks something like example below: > > (...) > Random effects: > Formula: ~1 | Run > (Intercept) Residual > StdDev: 3.483794 3.637523 > (...) > > While I have no problem obtaining the 'Residual' value by calling > fit$sigma, I have no idea how to obtain the '(Intercept)' value from the > 'fit' object. Anyone can help with that? > >There might be an official way to get it, but I would use as a hack. library(nlme) fm2 <- summary(lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)) sqrt(getVarCov(fm2)[1,1]) Dieter -- View this message in context: http://n4.nabble.com/nlme-library-lme-function-results-tp1015224p1015559.html Sent from the R help mailing list archive at Nabble.com.