Effacer les filtres
Effacer les filtres

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

20 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

Takeda Ryutaro
Takeda Ryutaro le 27 Sep 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 commentaires
Takeda Ryutaro
Takeda Ryutaro le 4 Oct 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].

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by