[R] panel ordering in nlme and augPred plots

Nathaniel Derby nbderby at gmail.com
Mon Jul 3 06:10:53 CEST 2006


Hi,

I'm new at this, I'm very confused, and I think I'm missing something
important here.  In our pet example we have this:

> fm <- lme(Orthodont)
> plot(Orthodont)
> plot(augPred(fm, level = 0:1))

which gives us a trellis plot with the females above the males,
starting with "F03", "F04", "F11", "F06", etc.  I thought the point of
this was to create an ordering where the females are ordered ("F01",
"F02", "F03", etc -- followed by the males being ordered).  However,
the solution given ...

> fm <- lme(Orthodont)
> plot(Orthodont)
> plot(augPred(fm1, level = 0:1), skip = rep(c(F,T), c(16, 2)))

... doesn't solve it -- although it does do all the females before
starting on the males.  That is, it starts with "F02", "F08", "F03",
... which isn't in order either.

Running Petr's code also gave output which wasn't ordered by the subjects.

Could someone please explain to me how to order the panels of the
trellis plot by the subjects?


thanks,

Nandor



More information about the R-help mailing list