Catherine A. Holt
2007-Nov-29 18:13 UTC
[R] Question on structuring variances using the lme4 package
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
Dieter Menne
2007-Nov-29 19:47 UTC
[R] Question on structuring variances using the lme4 package
Catherine A. Holt <caholt <at> u.washington.edu> writes:> 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 linearrelationship between X and Y> includes a fixed effect that is common across all species and random effectsthat 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 differamong species, I would like> to include an AR(1) process, and species-specific variances. I have beenunable 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,No, it is not (yet) possible. Any reason not use lme? It works, and it is stable, and well documented (Pinheiro/Bates)? lmer is a package in development, it has been made public mainly to provide feedback to the author, Douglas Bates. See also the special list http://news.gmane.org/gmane.comp.lang.r.lme4.devel Dieter
Seemingly Similar Threads
- GLM Repeated measures test of assumptions: e.g. test for sphericity e.g. Bartletts and Levenes homogenous variances
- extracting nested variances from lme4 model
- Specifying starting values in lme (nlme package) using msScale
- lme() with known level-one variances
- multiple variance structure in lmer giving zero variances