0todd0000 / spm1d

One-Dimensional Statistical Parametric Mapping in Python
GNU General Public License v3.0
61 stars 21 forks source link

Conducting One-way ANOVA unequal group sizes #201

Closed Moh200jo closed 2 years ago

Moh200jo commented 2 years ago

Hi, I am new to the SPM and I have managed to go through some examples and to run some tests using my data on Matlab. I have gait data from 3 groups (A= 30 participants,B=25 participants,C= 18 participants) and as N is different in each group it seems that I cannot run 1-way ANOVA to examine the effect of group on each kinematic variable. However, I have managed to compare between groups (A & B; A & C; B & C) using t-test "spm1d.stats.nonparam.ttest2" so I was wondering whether this would be an acceptable solution, please?

0todd0000 commented 2 years ago

That sounds like an acceptable solution, provided you correct for multiple comparisons across the different ttest2 calculations; there are three comparisons (AB, BC, AC), so a simple correction is p_critical = alpha / 3, where alpha is the Type I error rate (default: 0.05).

Also, you should also be able to use the parametric test spm1d.stats.ttest2. spm1d currently supports unequal group sizes for t-tests, but not ANOVA.