0
$\begingroup$

I ran an Anova using the car package.

y~A*B+C

A has 2 factor levels, B has 3 factor levels, and C has 2 factor levels (data from two data sets was included in the analysis. C is Experiment 1/2)

I found that there is a significant effect of A and B but no significant interaction. I now wanted to do post hoc comparisons among the levels of factor B separately for each level of factor A, which is of interest to me. I did another Anova for each level of factor A (y~B+C) and now want to do a post hoc comparison to see differences among the 3 levels of factor B under each condition. However, there is clear heteroscedasticity in the residuals, which I corrected for using the white.adjust argument in the Anova. Is there a post hoc test that can be used for heteroscedastic data in e.g. the emmeans package?

Should I rather use weighted regression (e.g. gls) to resolve the heteroscedasticity issue and then do e.g. tukey adjusted comparisons?

Any advice is much appreciated!

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes. That is what you should do. emmeans() summarizes model results, so you need to hand it a model that you trust. See also the FAQ vignette in the emmeans package, which also discusses this matter.

$\endgroup$
1
  • $\begingroup$ Many thanks for your fast reply. I assume you mean that I should rather go with weighted regression to fix the heteroscedasticity issue, as I cannot include a heteroscedasticity "correction" in the post hoc test, as I did for my Anova model. I will try a weighted gls model. Maybe that does the trick. I know that the games-howell post hoc test can be used for data that is heteroscedastic. Are there other post hoc tests? (more out of curiosity) $\endgroup$
    – Lizard2
    Commented Dec 15, 2020 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.