[R] lme invocation

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Tue Dec 17 00:33:03 CET 2002


Hi Folks,
I'm trying to understand the model specification formalities
for 'lme', and the documentation is leaving me a bit confused.

Specifically, using the example dataset 'Orthodont' in the
'nlme' package, first I use the invocation given in the example
shown by "?lme":

  > fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age

Despite the Comment ("# random is ~ age"),

  > summary(fm1)

says that

  [...]
  Random effects:
   Formula: ~age | Subject
   Structure: General positive-definite
  [...]
  Fixed effects: distance ~ age 

In view of the statement "Formula: ~age | Subject" above,
I next try:

  > fm1<-lme(distance~age,data=Orthodont,random=~age|Subject)
  > summary(fm1)
  [...]
  Random effects:
   Formula: ~age | Subject
   Structure: General positive-definite, Log-Cholesky parametrization
  [...]
  Fixed effects: distance ~ age 

So the summaries of the two invocations give identical statements
of the Random and Fixed Effects models, but the second adds
"Log-Cholesky parametrization" to the "Structure", and the numerical
results are very slightly different (though hardly enough to visible
in this case).

Finally, if I take the Comment ("# random is ~ age") from the first
invocation and base an invocation on that:

  > fm1<-lme(distance~age,data=Orthodont,random=~age)
  > summary(fm1)

I get results identical with the second invocation.

I'm not following how/why the first two different invocations give
rise to the different results, and am puzzled by their relationship
with the third (given the Comment).

Can someone explain?

With thanks,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 16-Dec-02                                       Time: 23:28:43
------------------------------ XFMail ------------------------------




More information about the R-help mailing list