[R] question about corStruct

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Feb 6 13:54:05 CET 2006


"Ing. Marek Brabec PhD" <mbrabec at szu.cz> writes:

> dear list,
> I am wondering if one can find examples and/or more detailed 
> descriptions of modifications needed when going beyond standard 
> corStruct classes (i.e. those already provided for use in lme/nlme)? 
> When I looked at pages 238-239 of Pinheiro/Bates (2000): Mixed-effects 
> models in S and S-plus, I found that I would need a bit more explicit 
> guidance what to do for implementing a new correlation structure than 
> that presented there.
> I am thinking e.g. of random walk as of a non-stationary example 
> corStruct to implement.
> Thanks for any help and/or pointing me to a source of general instructions.
> All the Best
> Marek Brabec

Hi Marek,

I don't think there is any better way than to try deciphering and
modifying an existing cor-class. Notice that there is a handful of
methods to be dealt with, like these for the compund symmetry case

> ls(pattern=".*corCompSymm", environment(gls))
[1] "Initialize.corCompSymm" "coef.corCompSymm"       "coef<-.corCompSymm"
[4] "corCompSymm"            "corMatrix.corCompSymm"  "recalc.corCompSymm"
[7] "summary.corCompSymm"


You might want to start off trying your hand by writing your own
variance class. This is somewhat easier since preexisting ones are
generally written in R whereas corClasses have .C calls inside.

        -p

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list