Correct fitlme posthoc tests for multiple comparisons
Ältere Kommentare anzeigen
This post helped me work out how to use coefTest to analyze single contrasts for linear mixed effects models.
Does anybody know how to perform a series of contrasts and obtain p-values that are corrected for the multiple comparisons (ideally via Tukey)?
Antworten (1)
UDAYA PEDDIRAJU
am 26 Dez. 2024
Hi Ken,
To perform post-hoc tests with Tukey's correction for multiple comparisons on a linear mixed effects model "fitlme" in MATLAB, follow these steps:
- Fit the Linear Mixed Effects Model:
lme = fitlme(data, 'response ~ fixedEffects + (1|randomEffects)');
- Perform Post-hoc Tests with Tukey's Correction:
[~,~,stats] = anova(lme);
results = multcompare(stats, 'CType', 'tukey-kramer');
- "CType", set to 'tukey-kramer', applies Tukey's correction for multiple comparisons.
- "results" will contain the comparison results with adjusted p-values.
This will provide you with Tukey-adjusted p-values for your multiple comparisons.
Let me know if this gives a workaround.
1 Kommentar
Ken Campbell
am 26 Dez. 2024
Kategorien
Mehr zu ANOVA finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!