Skip to content
Prev 2918 / 7420 Next

Answers to "Fixing heteroscedasticity in mixed-effects model?"

Hi all,

Just to summarize the very helpful set of answers I got to my query
(see below for the problem description).

1) Specify a variance structure to account for heterogeneity of
residuals across different values of the explanatory variables (e.g.,
weights = varPower() in the lme() function the nlme package). This
book is a fantastic resource:

Zuur AF, Ieno EN, Walker NJ, Saveliev AA and Smith GM (2009) Mixed
Effects Models and Extensions in Ecology with R. Springer Science and
Business Media, New York, NY

2) Try negative binomial (probably won't converge)

3) If you want to go the Gamma route, you can try (1) the development
version of lme4 (install from r-forge, but it might be broken right
now); (2) glmmADMB

4) Double check exactly which residuals you are getting before
worrying further about heterscedasticity. In a linear mixed model (Y =
Xb + Zu + e), there are two definitions of the residual: Y-X bhat and
Y - (X bhat + Z uhat).  You want the second to investigate unequal
variance of the e's.

5) Use a stronger transformation, like Y^(-1/2) or Y^(-1)

6) Investigate whether it's reasonable to ignore the heterogeneity.
See paper by Phil Dixon and David Fletcher, March 2012 Methods in
Ecology and Evolution.


I ended up choosing the first route (the route suggested by everyone
who replied), following Zuur and using AIC to select a formula for
weights, then choosing random effects, and finally choosing fixed
effects. I ended up with:

mod <- lme(logCd ~ logRe + Hab + logRe:Hab3 , random = ~1+logRe|Study,
weights=varExp(form=~logRe|Study))

Including Study in the variance function greatly increases the number
of model parameters, but AIC, BIC, and AICc all vastly prefer it over
any other formulation I tried.

Please drop me an email if anything looks fishy in that model.

Thanks again,
Malin
On Fri, Mar 23, 2012 at 1:57 PM, Malin Pinsky <malin.pinsky at gmail.com> wrote: