Skip to content

Question on structuring variances using the lme4 package

2 messages · Catherine A. Holt, Dieter Menne

#
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
#
Catherine A. Holt <caholt <at> u.washington.edu> writes:
(Y) for several,
relationship between X and Y
that vary by species. In the
among species, I would like
unable to do this so far in lme4.
years|i)
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