# NOT RUN {
## covariate is Time and grouping factor is Mare
cs1 <- corCAR1(0.2, form = ~ Time | Mare)
# Pinheiro and Bates, pp. 240, 243
fm1Ovar.lme <- lme(follicles ~
sin(2*pi*Time) + cos(2*pi*Time),
data = Ovary, random = pdDiag(~sin(2*pi*Time)))
fm4Ovar.lme <- update(fm1Ovar.lme,
correlation = corCAR1(form = ~Time))
# }
Run the code above in your browser using DataLab