[R] fit.contrast and groupedData-derived lme-objects: inheritance problem

jobst landgrebe jlandgr1 at gwdg.de
Thu Oct 16 07:43:00 CEST 2003


Dear List,

I have to use a groupedData-object as input for lme and run fit.contrast 
from gregmisc on it like this:

myData <- groupedData(y ~ 1 | group, subdata)

...               

lmeRes  <-      lme(y ~ dye + treatment, myData, random =
                                pdBlocked(list(~slide-1, ~animal-1), pdClass =
                                "pdIdent"),na.action=na.omit)         

myContrasts <- fit.contrast(lmeRes, "treatment", c(1,-1,0))

This works fine in interactive mode on a single dataset, but NOT within an
lapply over a list of groupedData-objects, where fit.contrast does not handle
the lme-class-object "lmeRes" properly: either it cannot inherit "myData"
anymore,
or (if I use a for-loop as a workaround) it computes the contrasts for
the first lme-object for all objects (which I find totally confusing).
Other functions working with the lme-object (line anova) work perfectly OK and
deal properly with the inheritance of groupedData via the lme-object.

So I guess there is some grouedData-related bug in fit.contrast.

How can I proceed?
1. Does anyone know how to extract contrastst from an lme-model avoiding
fit.contrast?
2. Can someone tell me how to hack fit.contrast to make it work properly with
groupedData-derived lme-objects?

Thanks in advance,

Jobst



Dr. Jobst Landgrebe
Universitaet Goettingen
Zentrum Biochemie
Humboldtallee 23
37073 Goettingen
Germany

tel: 0551/39-2316 oder -2223
fax: 0551/39-5960
web: http://www.microarrays.med.uni-goettingen.de
mail: jlandgr1 at gwdg.de




More information about the R-help mailing list