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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.