0todd0000 / spm1dmatlab

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

SPM rm 1way ANOVA #204

Closed gingerkongen closed 2 months ago

gingerkongen commented 5 months ago

Hi,

I wish to conduct a SPM rm 1way ANOVA

However, when using the downloaded dataset:

clear; clc

%(0) Load data: dataset = spm1d.data.uv1d.anova1rm.SpeedGRFcategoricalRM(); [Y,A,SUBJ] = deal(dataset.Y, dataset.A, dataset.SUBJ);

%(1) Conduct SPM analysis: spm_bs = spm1d.stats.anova1(Y, A); %between-subjects model spm = spm1d.stats.anova1rm(Y, A, SUBJ); %within-subjects model spmi = spm.inference(0.05); disp(spmi)

%(2) Plot: close all spmi.plot(); spmi.plot_threshold_label(); spmi.plot_p_values(); hold on plot(spm_bs.z, 'r') %between-subjects model

I get this warning message: Warning: Only one observation per subject found. Residuals and inference will be approximate. To avoid approximate residuals: (a) Add multiple observations per subject and per condition, and (b) ensure that all subjects and conditions have the same number of observations.

Does anyone know if this is fixable, or if it even matters?

0todd0000 commented 5 months ago

Please refer to this post for a description of this warning.

There are several other relevant discussions here and here. If these do not explain things please follow-up in the most relevant Issue and/or please feel free to continue the conversation here in this Issue.

The warning will be fixed / made more understandable in the next major version of spm1d (version 0.5).