How to use Wilcoxon signed-rank test and correct for multiple comparisons?

57 views (last 30 days)
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!

Accepted Answer

Star Strider
Star Strider on 5 Dec 2024 at 12:35
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 Comments
Sara Woods
Sara Woods on 5 Dec 2024 at 12:56
So, is it okay to stick with ranksum test, as these groups are totally independent from each other? Thanks!
Star Strider
Star Strider on 5 Dec 2024 at 13:12
My pleasure!
If they’re unpaired, then yes.
However you can only use multcompare with friedman.

Sign in to comment.

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!