How to use Wilcoxon signed-rank test and correct for multiple comparisons?
28 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sara Woods
el 5 de Dic. de 2024
Comentada: Star Strider
el 5 de Dic. de 2024
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 comentarios
Respuesta aceptada
Star Strider
el 5 de Dic. de 2024
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 comentarios
Star Strider
el 5 de Dic. de 2024
My pleasure!
If they’re unpaired, then yes.
However you can only use multcompare with friedman.
Más respuestas (0)
Ver también
Categorías
Más información sobre Analysis of Variance and Covariance en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!