0todd0000 / spm1dmatlab

One-Dimensional Statistical Parametric Mapping in Matlab.
GNU General Public License v3.0
28 stars 13 forks source link

ANOVA1rm: 1/only 1 observation - 2/post-hoc test p-value #124

Closed ThomasBraeckevelt closed 4 years ago

ThomasBraeckevelt commented 4 years ago

Hello there!

We performed a biomechanical analysis on 14 shoulders, doing 6 trials of a certain movement in 5 different conditions. Then we selected the 3 best trials and calculated the mean value for the 101 data points of these trials. As such we have one observation per shoulder per condition.

1) Could the results be negatively influenced using only 1 observation (data points are means of the 3 trials) instead of 3 observations? I have already read on the forum that it probably shouldn't make a meaningful difference but wanted to make sure.

For the statistical analysis we're using the one-way repeated measures ANOVA. When doing post-hoc paired T-tests, i have encountered the following. z: [1x101 double] df: [1 13] fhwm: 26.1102 resels: [1 3.8299] alpha: 0.0051 zstar: 4.7620 h0reject: 1 p-set: 0 p: 0

2) Is this a correct outcome of a post-hoc paired t-test with a p-value of 0?

I was hoping if you could help me with these questions. Thank you!

P.S.: Thank you for giving us researchers the opportunity to learn and use this technique!

0todd0000 commented 4 years ago
  1. It could make a difference, but likely only if trial-to-trial variability is large relative to between-subject variability. In many biomechanics experiments, trial-to-trial variability is quite small relative to between-subject variability, so often a single measurement (not even the mean) will yield similar results. If you're uncertain I suggest extracting a single scalar (e.g. value at time=50%) for each trial, then analyzing in other software like SPSS, both (a) including all trials, and (b) including only means. The results will likely be similar.

  2. The p value is likely a very small number, and is just displayed as zero. Use spm.p to check the actual value.

P.S. No problem! The spm1d team is happy to help!

ThomasBraeckevelt commented 4 years ago

Thank you for the swift and most helpful reply!

I had another question regarding the interpretation of the results of the ANOVA1RM we performed. For example how could we interpret the following graph where the between-subjects analysis is statistically significant and the within-subjects analysis isn’t?

The code we’ve been using: spm_bs = spm1d.stats.anova1(Y, A); %between-subjects model spm = spm1d.stats.anova1rm(Y, A, SUBJ); %within-subjects model spmi = spm.inference(0.05); disp(spmi)

The results:

SPM{F} inference Effect: ‘Main A’ z: [1X101 double] df: [4 52] fhwm: 70.1373 resels: [1 1.4258] alpha: 0.0500 zstar: 3.5340 H0reject: 1 p_set: 3.2634e-05 p: 2.1562e-12

spm

Thank you!

m-a-robinson commented 4 years ago

Hello,

Are you sure that it is the between-subjects model that is significant as I would expect this to be the other way around? In the example code the between subjects model is plotted using plot(spm_bs.z, 'r') %between-subjects model

Try just plotting your spmi object using spmi.plot(); and see if it is the red or black line that is generated. If it matches the black then it is the within-subjects model that is significant. Also from the disp(spmi) print you can see there is a hypothesis rejection based on the spmi variable.

Technically the between subjects analysis is not needed in this case and is just included for comparative purposes I believe.

ThomasBraeckevelt commented 4 years ago

Thank you for the swift reply! Following your advice (code below), i have been able to plot only the within-subjects model which appears to be the black line. I'm relieved!

%(1) Conduct SPM analysis: % spm_bs = spm1d.stats.anova1(Y, A); %between-subjects model spm = spm1d.stats.anova1rm(Y, A, SUBJ); %within-subjects model spmi = spm.inference(0.05); disp(spmi)

% %(3) Plot: % %close all figure spmi.plot(); xlabel('Time (%)')

%(2) Plot: %close all figure(2) spmi.plot(); spmi.plot_threshold_label(); spmi.plot_p_values(); % hold on % plot(spm_bs.z, 'r') %between-subjects model % xlim([0 100])