0todd0000 / spm1d

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

T2 test plot() attribute does not exist #122

Closed aledecos closed 4 years ago

aledecos commented 4 years ago

Hello!

I am new to this library and testing the T Squared test. It seems like there is no plot module for .inference Any guidance would be gladly appreciated!

Code: T2 = spm1d.stats.hotellings(final,mu) T2i = T2.inference(0.05) T2i.plot()

Error: AttributeError Traceback (most recent call last)

in ----> 1 T2i.plot() AttributeError: 'SPM0Di_T2' object has no attribute 'plot'
m-a-robinson commented 4 years ago

Hello,

It looks like your variable "final" is generating a 0D SPM variable hence the plot doesn't work. It also looks like you are using a one-sample hotellings test - which is only available for 0D data. If you wish to compare two 1D vector fields use either the two-sample or paired test (see the stats1d folder in the examples folder).

I would also check that you have the appropriate input structure for this test. The "final" variable should be of the structure JxQxI where J = number of responses (subjects), Q = number of nodes (e.g. 101) and i = number of vector components.

Regards Mark