Hi all. I would like to run a 2 way anova on some data investigating main effects and interactions. I am using R to do the analysis.
I have performed a levene test (code is leveneTest(dependent variable ~ independent variable 1 * ind var 2, center = median, data)
I get a very significant output stating that there is heterogeneity within the data (p<0.01).
It's my understanding that a welch anova can be used if you have 1 factor (IE alternative to 1 way ANOVA), but it's not clear to me what the approach would be for a multi-factor analysis.
I have read that weighted least squares regression and robust standard errors are an option for heterogeneity and heteroscedasticity, but the guides I read are normally geared towards linear regression rather than running an ANOVA. Can these approaches be used for a 2 way ANOVA, and if so, could you advise on the code?
Likewise, would it be more advisable to perform a Scheirer-Ray-Hare test (IE. non parametric alternative to 2 way ANOVA)?
Any advice would be appreciated, thanks in advance.