[R-sig-ME] lme question: separate serial correlation parameters by strata

Weigand, Stephen D. Weigand.Stephen at mayo.edu
Wed Mar 14 22:28:40 CET 2007


I'm not sure if this is appropriate for this list since this may 
be a very elementary question, but here it is:

I am working with data similar to the BodyWeight data set in the 
nlme package (Appendix A3 and pages 104 and 245 of Pinheiro & Bates)

I'd like to fit a model such as this

fit <- lme(weight ~ Time * Diet,
            data = BodyWeight,
            random = ~ Time,
            correlation = corCAR1(form = ~ Time))

but with a separate phi for each level of Diet.

My reasoning is that the autocorrelation may decay over time at 
different rates for the three diets.  (When I fit a separate 
model for each diet, I get estimates for phi of 0.85 for diet 1, 
0.83 for diet 2, and 0.53 for diet 3. I take this as some 
empirical support for this approach)

Can I do this using lme? (I'm using R 2.4.1 on 
sparc-sun-solaris2.10 with nlme version 3.1-78.)

Thank you,

Stephen


-- 
::::::::::::::::::::::::::::::::::
Stephen Weigand
Division of Biostatistics
Mayo Clinic Rochester, Minn., USA
Phone (507) 266-1650, fax 284-9542




More information about the R-sig-mixed-models mailing list