Skip to content
Prev 1687 / 20628 Next

heteroscedastic model in lme4

Anna,

lme4 cannot handle certain kinds of heteroscedasticity, but I believe it can handle the kind you have in mind. Search the r-sig-mixed-models archive for a discussion involving me and David Afshartous, especially the summary message titled
"[R-sig-ME] random effect variance per treatment group in lmer" that David posted 07/13/2007 04:18:08 PM

I can't be certain that the suggestion below would work without knowing more about your design, but if width were a factor with three levels then you might try setting up indicator variables Wind1, Wind2, and Wind3 (that each take on the value 1
when a site is at the indicator's target width and 0 otherwise) and then fit the model with something like
mrem <- lmer( log(Nhat+1)~Group + GreenPerc + sess + crop + VegDensity + Group:sess + Group:VegDensity + (0+Wind1|site) + (0+Wind2|site) + (0+Wind3|site), data=all, method="REML" )

alan
r-sig-mixed-models at r-project.org on Friday, December 19, 2008 at 6:00 AM -0500 wrote:
--
Alan B. Cobo-Lewis, Ph.D.		(207) 581-3840 tel
Department of Psychology		(207) 581-6128 fax
University of Maine
Orono, ME 04469-5742     		alanc at maine.edu

http://www.umaine.edu/visualperception