Best Post-Hoc method for Friedman?

17 次查看(过去 30 天)
Pegah Hosseini
Pegah Hosseini 2013-8-2
回答: Aditya 2024-1-31
Hi,
I am currently applying one-way ANOVA to 5 groups of power values obtained from spectrogram of EEG signals. Then I apply multcompare function to the stat output of ANOVA with 'Tukey' as 'ctype'.
I assumed that my power values had normal distribution so I was happy with ANOVA but I tested my power values with kstest and it seems that they do not have normal distribution. So, I am going for Friedman instead but I am not sure what I should choose as 'ctype' in multcompare or if I have to change any other parameter in multcompare function to have a reliable post-hoc result. Any suggestions?
I see in the literature that one post-hoc method for Friedman is Nemenyi which does not seem to be available in multcompare. Is there any equivalents?
Thanks, Pegah

回答(1 个)

Aditya
Aditya 2024-1-31
When you have non-normally distributed data and you're using a non-parametric alternative to one-way ANOVA, such as the Friedman test, you need to use a post-hoc test that's appropriate for non-parametric data.
The Friedman test is a non-parametric test for detecting differences in treatments across multiple test attempts. MATLAB's multcompare function is typically used after anova1, anovan, or other parametric ANOVA functions. It does not directly support non-parametric post-hoc comparisons after the Friedman test.
However, you can perform post-hoc analysis after the Friedman test using the multcompare function with the output of friedman. When using multcompare with the result of a Friedman test, it defaults to using the Tukey's honestly significant difference criterion for multiple comparisons, which assumes a Chi-square distribution.
Here's an example of how you might use friedman followed by multcompare in MATLAB:
[p, tbl, stats] = friedman(yourData, 1, 'off'); % 'off' turns off the display
[c, m] = multcompare(stats, 'CType', 'tukey-kramer'); % Using Tukey-Kramer for post-hoc
In the above code, yourData is a matrix where each column represents a different group (treatment) and each row represents a matched subject across the groups. The friedman function returns a stats structure that contains information needed for the post-hoc test.
Regarding the Nemenyi test, it is indeed not directly available in MATLAB's multcompare function. If you want to use the Nemenyi test, you will need to implement it yourself or look for a third-party implementation. The Nemenyi test is similar to the Tukey test, but it is specifically designed for non-parametric data.

类别

Help CenterFile Exchange 中查找有关 ANOVA 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by