How to use Wilcoxon signed-rank test and correct for multiple comparisons?
조회 수: 23 (최근 30일)
이전 댓글 표시
Hi all,
Let's say I have three independent variables: sex (female vs. male), age (young vs. adult) and exposure (drug vs. control).
Each control young female, control young male, control adult female, control adult male, drug young female, drug young male, drug adult female, drug adult male exhibit distinct median values (non-parametric) for surprise detection (SD).
These groups have unequal N but the N of each group is enough to perform statistical comparisons. So, let's continue.
I want to perform a Wilcoxon signed-rank to observe sex and age differences within control and drug groups, and exposure differences between control and drug groups matched by sex and age.
So, I would perform several ranksum tests...
%% Sex and age differences in the control group
p_sex_young_control = ranksum(control young female SD, control young male SD)
p_sex_adult_control = ranksum(control adult female SD, control adult male SD)
p_age_control_females = ranksum(control young female SD, control adult female SD)
p_age_control_males = ranksum(control young male SD, control adult male SD)
%% Sex and age differences in the drug group
p_sex_young_drug = ranksum(drug young female SD, drug young male SD)
p_sex_adult_drug = ranksum(drug adult female SD, drug adult male SD)
p_age_drug_females = ranksum(drug young female SD, drug adult female SD)
p_age_drug_males = ranksum(drug young male SD, drug adult male SD)
%% Exposure differences between control and drug groups matched by sex and age
p_exposure_young_females = ranksum(drug young female SD, control young female SD)
p_exposure_adult_females = ranksum(drug adult female SD, control adult female SD)
p_exposure_young_males = ranksum(drug young male SD, control young male SD)
p_exposure_adult_males = ranksum(drug adult male SD, control adult male SD)
Is this and OK approach? Or maybe because I have THREE independent variables, shall I approach this with multiple comparisons? In this case, how could I do it as ranksum only gives one p value?
Thanks!
댓글 수: 0
채택된 답변
Star Strider
2024년 12월 5일
The signed-rank test is for paired studies (for example the same group before and after an intervention) and ranksum for unpaired studies (intervention on one group and a control group). The multcompare function can use the ‘stats’ structure to do multiple comparisons, however not for the signrank or ranksum functions. For nonparametric tests, it will only accept the ‘stats’ structure from the friedman function. See the documentation section on stats for details. (There are also three other versions of multtcompare for various ANOVA tests.)
댓글 수: 2
Star Strider
2024년 12월 5일
My pleasure!
If they’re unpaired, then yes.
However you can only use multcompare with friedman.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!