0todd0000 / spm1dmatlab

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

interp issue #206

Closed gab179 closed 4 months ago

gab179 commented 5 months ago

Hi, I'm trying to run an SPM paired ttest analysis following the exemple downloaded on spm1d.org.

When I try to put my datas in the code, I get the error message that "interp is not a recognize parameter".

Here is the code I use :

[YA,YB] = deal(torque_exc_final_D, torque_exc_final_G);

%(1) Conduct SPM analysis: spm = spm1d.stats.ttest_paired(YA, YB); spmi = spm.inference(0.05, 'two_tailed', false, 'interp',true); disp(spmi)

Thank you for your help

0todd0000 commented 5 months ago

interp will only generate an error if the data are 0D and not 1D.

For 1D analysis YA and YB are 2D arrays with shape (J,Q), where:

For 0D analysis YA and YB are instead 1D arrays with shape (J,) (i.e., a J-component vector)

If your data are 0D then please try inference without interp like this:

spmi = spm.inference(0.05, 'two_tailed', false);