0todd0000/spm1d

Post hoc after non parametric 1d_anova1rm in Matlab

Closed this issue · 3 comments

Hi, Todd

I want to conduct a post hoc following the non parametric 1d_anova1rm. however I struggle to find a good way to do this. Can you help?

The code I used for the anova is below. Y= knee flexion during three different conditions. Therefore the post hoc must compare the three conditions pairwise.

""
clear; clc

% Last inn data fra Excel-filene
Y = importdata('Matlab1.xlsx');
A = importdata('Matlab2.xlsx');
SUBJ = importdata('Matlab3.xlsx');

% Forbered en tom matrise for dobbeltverdier
Y_double = zeros(size(Y));

% Konverter strengene til dobbeltverdier
for i = 1:numel(Y)
Y_double(i) = str2double(Y{i});

end

%(1) Conduct non-parametric test:
rng(0)
alpha = 0.05;
iterations = 100;
snpm = spm1d.stats.nonparam.anova1rm(Y_double, A, SUBJ);
snpmi = snpm.inference(alpha, 'iterations', iterations);
disp('Non-Parametric results')
disp( snpmi )

%(2) Compare to parametric inference:
spm = spm1d.stats.anova1rm(Y_double, A, SUBJ);
spmi = spm.inference(alpha);
disp('Parametric results')
disp( spmi )
% plot:
close all

% Plot med x-aksen fra 0 til 100
figure;
spmi.plot();
hold on

% Begrens x-aksen til 0, 50 og 100
xticks([0, 25, 50, 75, 100]);
yticks([0, 60, 120, 180]);

title('SPM ANOVA', 'FontSize', 18);
xlabel('Time (%)');

% Plot med x-aksen fra 0 til 100
figure;
snpmi.plot();
hold on

% Begrens x-aksen til 0, 50 og 100
xticks([0, 25, 50, 75, 100]);
yticks([0, 60, 120, 180]);

title('SPM ANOVA', 'FontSize', 18);
xlabel('Time (%)');
""

Thank you

Apologies for the delay! I missed your question in my inbox. For anova1rm paired t tests are an appropriate post hoc procedure, so I suggest conducting paired post hoc tests using spm1d.stats.ttest_paired, and adjusting the critical p-value for the number of pairs.

Hi,

I am running some 2D SPM anovas on sEMG data

However, I noticed some pretty large F-values (F= 10), which i belive to be quite strict.

Do you recomend just sticking with the output from the spm-pack or should i try to adjust something?

  • F = 10 is not that big, and likely not too far over the critical threshold. It is not unusual to see F-values of 100 or greater so I recommend not being concerned about the F-value size.

  • Since spm1d does not directly support data processing prior to statistical analysis, I cannot comment on how the data should be processed. However, as a general rule: it is usually not a good idea to adjust data processing particulars with the goal of altering statistical results.