0todd0000 / spm1d

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

Mean difference value of a signifiant cluster #169

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello,

In the work of De Ridder et al, (2013) I see that they specify each time the average differences between the groups on the significant gait clusters "from 11% to 73% of the stance phase (average difference of 2.17°, P >0.001), "

So I was wondering if the spmi.clusters presented a data indicating the average difference between the two groups, or if it was necessary to make a calculation in addition. I looked at the variables contained in spm1d.geom.Cluster, but I didn't necessarily find an answer

Thank you for your reply.

0todd0000 commented 3 years ago

You are correct, that would need to be calculated manually. The Cluster class doesn't store these data but would nevertheless be useful for this. For example, from ./spm1d/examples/stats1d/ex_ttest.py

alpha = 0.05
t     = spm1d.stats.ttest(Y, mu)
ti    = t.inference(alpha, two_tailed=False, interp=True, circular=False)

print( ti.clusters )

This yields the output:

[Cluster
    threshold       :  3.227
    centroid        :  (75.014, 3.535)
    isinterpolated  :  True
    iswrapped       :  False
    endpoints       :  (72.822, 77.247)
    extent          :  4.425
    extent (resels) :  0.16667
    height (min)    :  3.22704
    P               :  0.04441
 ]

You can use endpoints to specify the boundaries for regional calculations including means.

ghost commented 3 years ago

Thank you for your reply!