0todd0000 / spm1d

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

Comparing same subjects performing different movement techniques #258

Closed MariahSabioni closed 10 months ago

MariahSabioni commented 1 year ago

Hi Todd! I watched your lecture on Stuart McErlain-Naylor youtube channel and it was very helpful, thank you for the great material. I have read several issues which helped me come up with a first approach for my study, but I'd appreciate some experienced advice.

I want to find out if there are differences in the scapula and humerus joint angles on 3 different techniques of pull-ups. I have the following setup:

I repeated spm1d.stats.anova1rm (on python) for each dof with the following configuration: SUBJ (54,) array of label encoding of the subjects; A (54,) array of label encoding of the techniques; and Y (54,1000) array with the measurements of that given dof. I included the 2 repetitions of each technique of each subject, but I did not do any repeatability test beforehand.

My questions:

Thank you in advance!

0todd0000 commented 1 year ago

Hello, sorry for the delay!



Would you agree with using anova1rm with both cycles of the same technique and subject?

Yes, there appears to be just one experimental factor (TECHNNIQUE) so one-way is appropriate, and if all individuals performed in all three techniques then anova1rm does indeed sound appropriate.



Would it be an adequate approach to perform post hoc paired t-tests for each pair of techniques? In that case, could you briefly explain the data structure of the input to spm1d.stats.ttest_paired ?

Yes, I suggest calculating within-subject means for each of the three techniques (one mean per subject, per condition) then submitting two of the three (9, 1000) arrays to post hoc paired t tests. Note that the subjects must be ordered consistently in the (9,1000) arrays, so the Nth row of each array corresponds to the same subject. If you have Y, A and SUBJ already then this can be done using something like this:

uA = np.unique(A)
y0 = np.array( [Y[(A==uA[0]) & (SUBJ==u)].mean(axis=0)  for u in np.unique(SUBJ)] )
y1 = np.array( [Y[(A==uA[1]) & (SUBJ==u)].mean(axis=0)  for u in np.unique(SUBJ)] )
y2 = np.array( [Y[(A==uA[2]) & (SUBJ==u)].mean(axis=0)  for u in np.unique(SUBJ)] )

t01 = spm1d.stats.ttest_paired(y1, y0)
t20 = spm1d.stats.ttest_paired(y2, y0)
t21 = spm1d.stats.ttest_paired(y2, y1)



What is the recommended way of presenting the results of the ANOVA? Is the plot provided on the ex_anova1rm.py widely accepted?

My view is that the F statistic is most informative because it indicates effect size. Some prefer using means and then using horizontal bars to indicate which temporal regions exceeded the critical threshold. I think that either is fine, and alternative plots may also be fine, and as far as I know there is no single format that is more preferred than another. The best approach may ultimately come down to the messages you wish to convey.