0todd0000/spm1dmatlab

Zero variance with impact velocity (drop jump) data

Closed this issue · 2 comments

Hello,
I'm looking at post-hoc t-tests after an initial ANOVA, looking at paired samples (participants completed 10 sest of 10 drop on two separate occasions).
However... as I'm calculating impact velocity from the depth of the jump, impact velocity is the same for every jump, meaning that t = 0 for every one of my jumps = 3.40232 ms-2. I'm getting the error

"--- spm1d ZERO VARIANCE ERROR ---
Zero variance detected at the following nodes:
1
Remove all zero-variance nodes before running tests.
Error in spm1d.stats.ttest (line 15)
spm1d.util.check_zero_var(Y);
Error in spm1d.stats.ttest_paired (line 8)
SPM = spm1d.stats.ttest(yA-yB, varargin{:});".

Is there any way around this? Thanks!

Apologies for the delay!

It is not possible to statistically compare data that has zero variance. Please remove the zero-variance nodes before running analysis. If it is just the first node then slice out that part of the data array like this:

y = y(:,2:end);

Ah, sorted! Silly me. Thanks and sorry for the delayed response