s-news
[Top] [All Lists]

problem with pairs.lme()

To: s-news-list <s-news@lists.biostat.wustl.edu>
Subject: problem with pairs.lme()
From: Gerrit Eichner <Gerrit.Eichner@math.uni-giessen.de>
Date: Fri, 21 Mar 2003 15:10:23 +0100 (CET)
Hello, nlme-experts among the list members,

I have encountered a problem with the function pairs.lme() from the
nlme-library, version 3.3.1 (using S-PLUS, Ver. 6.0 Rel. 1 for Sun SPARC,
SunOS 5.6), about which I haven't found anything in the archive:

If there are more than 2 random coefficients in the model the attempt to
create a conditional pairs plot of the random coefficients (using the |
operator to define separate trellis panels) produces a (for me
untractable) error message.

For example, take a look at the groupedData object Orthodont in Dr.
Pinheiro's and Dr. Bates' book "Mixed-Effects Models in S and S-PLUS":

> Orthodont[ c( 1:3, 108),]
Grouped Data: distance ~ age | Subject
    distance age Subject    Sex
  1       26   8     M01   Male
....
108       28  14     F11 Female


Fitting the model
> O1.lme <- lme( fixed= distance ~ Sex * age, random= ~ age | Subject,
+                data= Orthodont)

and checking the assumptions on the random effects by
> pairs( O1.lme, ~ ranef( .) | Sex)

works perfectly fine yielding a trellis plot with two panels (one for
Male, one for Female), each of which containing the age coefficients vs.
the intercepts.


However, if I extend the model (for what reason ever) to one that is
quadratic in age

> O2.lme <- update( O1.lme, fixed= . ~ . + age^2, random= ~ . + age^2)

the attempt to produce a pairs plot

> pairs( O2.lme, ~ ranef( .) | Sex)

results in the following error mesage:

Problem in eval(expr[[1]], data): Object ".x" not found

Is this a bug or a normal limitation of pairs.lme(), or have I ovelooked
anything? And if it is the first, does anybody have a work-around for the
mentioned problem?

Thank you for any help.

 Best regards  --  Gerrit

 -------------------------------------------------------------------------
  Dr. Gerrit Eichner                        Mathematical Institute of the
  gerrit.eichner@math.uni-giessen.de        Justus-Liebig-Univ. Giessen
  Tel: +49-(0)641-99-32104                  Arndtstr. 2, D-35392 Giessen
  Fax: +49-(0)641-99-32029        http://www.uni-giessen.de/AG_Stochastik
 -------------------------------------------------------------------------




<Prev in Thread] Current Thread [Next in Thread>
  • problem with pairs.lme(), Gerrit Eichner <=