Zonghui Hu <[EMAIL PROTECTED]> writes: > I have a question on using lme on a mixed effects model with nested > error structure. After applying lme to the data, and put the outcome > in, say TR.lme. I can extract the fixed effects by > TR.lme$coef$fixed. However, when I use TR.lme$coef$random.effects, it > does not give the variance components that I need, but a vector of > values at each nested level. What I want are the estimated variance > components that show up with summary(TR.lme), but I can not extract > them from TR.lme.
It is better to use the extractor functions fixef (or fixed.effects) and ranef (of random.effects) to extract the estimated coefficients. You should not depend on a particular internal representation of the object returned from a model-fitting function. For example, objects returned by the version of lme in the lme4 package uses a different internal representation. As indicated in the output from help(package = "nlme") the function VarCorr returns the variance and correlation components. -- Douglas Bates [EMAIL PROTECTED] Statistics Department 608/262-2598 University of Wisconsin - Madison http://www.stat.wisc.edu/~bates/ ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
