Skip to main content
1 of 4
JJB
  • 81
  • 4

How to handle heteroscedasticity in a mixed-effects model?

I'm analyzing data from a repeated measures study using a mixed-effects linear model. My dependent variable is Y (an eye-tracking parameter: total fixation duration), and I'm investigating the effect of a continuous predictor X (Likert scale score), as well as a potential moderation by a categorical variable Z (3 groups).

I've specified two models:

  • A model with X predicting Y
  • A second model including the interaction term X * Z

After fitting the models, residual plots show a clear funnel shape, suggesting heteroscedasticity.

My question:

  • Would a log transformation of the dependent variable (Y) be appropriate to address the heteroscedasticity, or could this issue be handled using bootstrapped standard errors instead?
  • Are there best practices for addressing this issue in mixed-effects models with repeated measures?

I'm using lme4 in R. Any suggestions or clarifications would be greatly appreciated!

JJB
  • 81
  • 4