0todd0000 / spm1d

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

The Neptune 1999 example #46

Closed kohleth closed 8 years ago

kohleth commented 8 years ago

Hi,

I am not usually a Python user, but I manage to run your python Neptune example. However, I got the following result print T2.inference(0.05) SPM{T2} inference field SPM.z : (1x101) raw test stat field SPM.df : (3.0, 7.0) SPM.fwhm : 19.28245 SPM.resels : (1, 5.18606) Inference: SPM.alpha : 0.050 SPM.zstar : 106.09209 SPM.h0reject : False SPM.p_set : 1.000 SPM.p_cluster : ()

The critical threshold is 106 which is not quite the 30 I was expecting. Can you tell me what's wrong?

0todd0000 commented 8 years ago

Hi Kohleth,

That result actually looks correct. I think the published result you're referring to is the one in the figure below, which is Fig.5 from Pataky et al. (2013). http://dx.doi.org/10.1016/j.jbiomech.2013.07.031

fig2_neptune_spmt2

The figure above is incorrect due to an error in our T2 inference code that we discovered after publication. After correcting the code we subsequently reported the correct result (see figure below) in a Corrigendum: http://dx.doi.org/10.1016/j.jbiomech.2014.09.025

fig5

The threshold is so high because the sample size is very small (N=8) with respect to the number of vector components (I=3). This makes the covariance estimate quite poor, and the threshold needs to be very high to compensate. A few more details about the error are available in the Corrigendum.

In case you're interested in robustly checking whether or not the T2 thresholds are correct, there are some example scripts here: http://www.spm1d.org/rft1d/Examples/Validation/TestStatistic.html#multivariate Those scripts iteratively generate random samples of 1D Gaussian fields and conduct Hotelling's T2 tests on each generated dataset. As you increase the number of simulation iterations the simulation results should converge to RFT's theoretical values.

Please let me know if anything is unclear.

Cheers,

Todd

kohleth commented 8 years ago

thanks. That's clear.