Azzera filtri
Azzera filtri

Trouble Plotting SPM1D Paired t-Test Results in MATLAB: 'Unrecognized Method' Warning

20 visualizzazioni (ultimi 30 giorni)
I have installed SPM version 12, and subsequently, I installed spm1d version M.0.4.10 (dated September 23, 2022). I used the following code to perform a paired t-test:
spm = spm1d.stats.ttest_paired(Ext_D, Ext_F);
spmi = spm.inference(0.05, 'two_tailed', true);
spm.plot();
The spmi object is successfully created, but when I attempt to plot it in MATLAB, I encounter a warning: 'Unrecognized method, property, or field 'plot' for class 'spm1d.stats.spm.SPM0D'.'
I'm seeking assistance to resolve this issue. Can someone please help me?

Risposta accettata

Takeda Ryutaro
Takeda Ryutaro il 27 Set 2023
Sorry, I posted this in the comments section by mistake.
spm1d.plot.plot_meanSD(YA,'color','r');
hold on;
spm1d.plot.plot_meanSD(YB,'color','b');
title('Data','FontSize',18);
legend({'YA','YA SD','YB','YB SD'});
%(1) Conduct SPM analysis:
spm = spm1d.stats.ttest2(YA, YB);
spmi = spm.inference(0.05, 'two_tailed',true, 'interp',true);
% disp(spmi);
%(2) Plot:
subplot(1,2,2);
spmi.plot();
spmi.plot_threshold_label();
spmi.plot_p_values();
title('SPM analysis','FontSize',18);
  4 Commenti
Takeda Ryutaro
Takeda Ryutaro il 4 Ott 2023
Hi!
Seeing your data, you data size is [250,1].
Does the row represent time point?
If you want to do SPM1d, the size of the data should be [subject, timepoint].

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Data Distribution Plots in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by