# [R] lme: Confusion about Variances

Spencer Graves spencer.graves at pdf.com
Fri Dec 31 18:02:54 CET 2004

```      I'm unable to parse your question in the time I have right now,
but have you worked the examples with ?lme in library(nlme), extending
them with "intervals" and "VarCorr"?  If you do that, I suspect you
Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus
(Springer)?  This book made the difference between failure and success
in my attempts to understand and use lme.

fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)
summary(fm1)
summary(fm2)
intervals(fm1)
intervals(fm2)
anova(fm1, fm2)
VarCorr(fm1)
VarCorr(fm2)

hope this helps.
spencer graves

h.brunschwig at utoronto.ca wrote:

>Dear R users!
>
>I used lme to fit a mixed model with random intercept and spatial Gaussian
>correlation i.e. I fitted a model of the following form:
>
>Y = X*beta + error
>
>and
>
>error = U + W(t) + Z
>
>where U is the random intercept (normally distributed), W(t) the stationary
>Gaussian process and Z also a normally distributed (the residual) rv. Each of
>these three random variables have a variance which I am not sure to which output
>in lme they belong to.
>VarCorr gives the intercept and residual variance which I assume belong to U and
>Z respectively. The output of lme gives another estimate called "range" which I
>assume belongs to the parameter estimate needed for the Gaussian correlation.
>
>Are my assumptions correct? And where can I get the variance for the W(t) from?
>
>Thanks for any answers...and happy new year...
>
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help