0todd0000 / spm1dmatlab

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

Zero variance with impact velocity (drop jump) data #179

Closed freddybrown1984 closed 1 year ago

freddybrown1984 commented 2 years ago

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.ttestpaired (line 8) SPM = spm1d.stats.ttest(yA-yB, varargin{:});".

Is there any way around this? Thanks!

0todd0000 commented 1 year ago

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);
freddybrown1984 commented 1 year ago

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