[R] Question on structuring variances using the lme4 package

Catherine A. Holt caholt at u.washington.edu
Thu Nov 29 19:13:51 CET 2007


I am modeling the effects of an environmental variable (X) on fish recruitment (Y) for several, ecologically related species (i) using a mixed-effects model. The linear relationship between X and Y includes a fixed effect that is common across all species and random effects that vary by species. In the lmer() notation from the package lme4:

Model<- lmer(Y ~ X +(X|i))

Because the residuals of the model are autocorrelated and the variances differ among species, I would like to include an AR(1) process, and species-specific variances. I have been unable to do this so far in lme4. In the older “nlme” package, this was possible using:

Model<-update (weights=varIdent(form= ~1|i), correlation = corAR1(form = ~ years|i)

Is this possible in lme4, and if so, how? Any help would be much appreciated. 
Cheers,

Carrie Holt, Ph.D., M.Sc., B.Sc.(Honours)
University of Washington
School of Aquatic & Fishery Sciences
Box 355020
Seattle, WA 98195
USA



More information about the R-help mailing list