[R] Constructing groupedData objects in nlme - a little problem

Dieter Menne dieter.menne at menne-biomed.de
Wed Jun 4 19:15:30 CEST 2008

Toby Marthews <Toby.Marthews <at> lsce.ipsl.fr> writes:

> Dear R-help,
> I am trying to create groupedData objects using the nlme library. I'm
> missing something basic, I know:
> Here is the first example in ch.1 of Pinheiro & Bates (2000):

> ...but, as you can see, the coefficients I get at the end this time are
> completely different and I don't know why. Somehow, I am not creating the
> structure properly even though the formula and data values are all
> correct.

Hank is right. On the other hand your well-defined query points to a problem
using groupedData. I do  a lot of my work with nlme and love it, but I admit
that I only started to understand it after I totally stopped using groupedData.
Which makes reading Pinheiro/Bates sometimes difficult, because many examples
give the impression that these must be done with groupedData. Everything can be
done by explicitly saying what should be analyzed in lme and friends, there is
no need to rely on groupedData.

Note that in lme4 that partially re-designs nlme, there is no such thing as


More information about the R-help mailing list