tramarobin / fctSnPM

Using spm1d package (v.0.4.3), compute anova and post-hoc tests from anova1 to anova3rm, with a non-parametric approach (permutation tests)
GNU General Public License v3.0
2 stars 2 forks source link

Interaction clusters for 3x3 two way ANOVA #14

Closed jinhee615 closed 3 years ago

jinhee615 commented 3 years ago

Hello. I'm trying to run 3x3 two way repeated ANOVA.

Significant interaction occured, and Now I want to interpret it by observing graphs and clusters.

I have Three Groups(I,N,O), Three Conditions(In-toed, Normal, Out-toed).

image Images above showed in Post hoc > Group x Condition > Condition. (Right Image is I + SPM, N + SPM, O + SPM each.)

As You See, there are total 7 areas of significance in I-O comparsion, 3 significances in N-O comparison. (3rd, 4th columns)

I tried to find clusters with code spmAnalysis2.posthoc{1,3}.tTests.clusterLocation spmAnalysis2.posthoc{1,3}.tTests.clusterP image image

My questions are, 1) why there is 1x11 cells, and most of them are 0?

image

2) What does cluster location in above image means? cluster location is [0, 18.5854], [97.2447,100] But none of graph(in folder Group x Condition > Condition > SPM) seems to have those cluster location.

Thanks in advance!

tramarobin commented 3 years ago

Significant interaction occured, and Now I want to interpret it by observing graphs and clusters.

There are 3 important results here for me :

Before you spend more time interpreting the graphs, make sure to increase the number of iterations with the multiIT optional input. Defining this value at 1000 will stabilized the F and T thresholds to have a reproductible analysis.

why there is 1x11 cells, and most of them are 0?

spmAnalysis2.posthoc{1,3} are all the post hocs for the interactions. There are 18 t-tests with your experimental design. As the size of spmAnalysis2.posthoc{1,3} is 11, that means that none of the 12 to 18 t-tests had significant clusters. However, if there were not significant clusters in some of the 11 firsts t-tests, they will appear empty.

What does cluster location in above image means? cluster location is [0, 18.5854], [97.2447,100] But none of graph(in folder Group x Condition > Condition > SPM) seems to have those cluster location.

You are here in the 11th t-test, and judging by the values the comparison is Intoed - Outtoed for the group N. The clusters location and p-value are not corrected with the ANOVA, consequently, it is simpler to refer to graphs of means directly. We can see that there are two significant clusters, one from 0 to 19%, and one from 97 to 100%. The first one is the one depicted in the N graph (left on the middle) as there is an interaction effect. However, the second one is not displayed on this graph as there is no interaction effect at these location, but only a main effect that is displayed instead. You can find this cluster on the graph at the center of the t-tests (row N, column I-O), where the t-tests goes just under the threshold on 97-100%. As said before, as their is only a main effect of the condition at these location, the blue line reflects the main effect on 90-100%.

Hope it help you understanding your results.

jinhee615 commented 3 years ago

Before you spend more time interpreting the graphs, make sure to increase the number of iterations with the multiIT optional input. Defining this value at 1000 will stabilized the F and T thresholds to have a reproductible analysis.

I couldn' find multiIT function. can you tell me an example to run it?

You are here in the 11th t-test, and judging by the values the comparison is Intoed - Outtoed for the group N.

Can you tell me how did you know 11th is Intoed-Outtoed Group N? (t-test order)

I thought t-test order like below

  1. Intoe(I-N),
  2. Intoe(I-O),
  3. Intoe(N-O), 4.Normal(I-N), 5.Normal(I-O), 6.Normal(O-N) 7.Outtoe(I-N), 8.Outtoe(I-O), 9.Outtoe(O-N), 10.I (Intoe-Normal), 11.I (Intoe-Outtoe), 12.I (Normal-Outtoe) 13.N (Intoe-Normal), 14.N (Intoe-Outtoe), 15.N (Normal-Outtoe), 16.O (Intoe-Normal) 17.O(Intoe-Outtoe) 18.O (Normal-Outtoe),
tramarobin commented 3 years ago

I couldn' find multiIT function. can you tell me an example to run it?

You can find the list of all the optinal inputs here, and more precisely here for multiIT :

multiIT define the number of permutations as multiIT/alpha. Default is 10, corresponds to 200 iterations for 5% risk.

spmAnalysis=fctSPM(data, independantEffects, repeatedMeasuresEffects, 'multiIT', 500)

I suggest here a value of 500, permitting to do 500/alpha iterations so 10000 iterations for an alpha risk of 5%. However, as the critical p-value decrease with the number of post hoc tests (0.05/18 = 0.0028), the number of iterations will still be 10000. If you want to override the limit of 10000 iterations (which was put in place to avoid too great computing time), use maximalIT and define the value of your convenience.

for instance :

spmAnalysis=fctSPM(data, independantEffects, repeatedMeasuresEffects, 'multiIT', 500, 'maximalIT', 20000)

Here, even if the p-value to achieve significance is 0.0028 a number of iterations will be set at ~178000, this value will be decrease at 20000. This is of course sufficient because 20000 iterations allow an accuracy of the p-value of 1/20000 = 0.00005, which is 5 times smaller than 0.0028. If you want to know more about the permutations tests, I recommend you this article : Nichols TE, Holmes AP (2002). Nonparametric permutation tests for functional neuroimaging: a primer with examples. Human Brain Mapping 15(1), 1–25.

Can you tell me how did you know 11th is Intoed-Outtoed Group N? (t-test order)

It was just a guess with the graph you showed me. The simpler way to know what comparison is performed is too look at spmAnalysis.posthoc{3}.tTests.names

jinhee615 commented 3 years ago

Thanks! My code now is : spmAnalysis2=fctSPM(Y2,independantEffects,repeatedMeasuresEffects,'effectsNames',effectNames); to use multiIT, it is okay to change like below? spmAnalysis2=fctSPM(Y2,independantEffects, repeatedMeasureEffects, 'multiiT','500,'maximalIT',20000);

and one more, In t-test, Can I know 'How much' difference in which variables? For example, "NO group showed n~n(degree) larger ankle eversion angle than NI group".

tramarobin commented 3 years ago

My code now is : spmAnalysis2=fctSPM(Y2,independantEffects,repeatedMeasuresEffects,'effectsNames',effectNames); to use multiIT, it is okay to change like below? spmAnalysis2=fctSPM(Y2,independantEffects, repeatedMeasureEffects, 'multiiT','500,'maximalIT',20000);

Yes it is ok to change it like this. You can add as many as optional inputs in the function, this can allow you to personalized figures directly. The only order of importance are for the three firsts inputs. For instance :

spmAnalysis2=fctSPM(Y2,independantEffects, repeatedMeasureEffects, 'effectsNames', effectNames, 'multiiT', 500 , 'maximalIT', 20000);

In t-test, Can I know 'How much' difference in which variables?

In the folder 'Post hoc/Group x Condition/DIFF', you can find graphs with differences and relative differences. For your Group effect the difference is the mean difference while for your Condition effect the graphs show the mean and the standard deviation. You can also use the effect sizes 'Post hoc/Group x Condition/ES' to interpret your results. However, they have not been validated and can just give you an idea of the magnitude of the differences.

To obtain values (and not graphs), you can look at spmAnalysis.posthoc.differences.continuum and spmAnalysis.posthoc.differences.continuumRelative in which the differences and relatives differences are calculated.

jinhee615 commented 3 years ago

Thank You so much!