0todd0000 / spm1dmatlab

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

Parametric and Nonparametric lead to different results #166

Closed QMuentin closed 2 years ago

QMuentin commented 2 years ago

Hi Todd,

I have a question regarding the interpretation of the difference in the outcomes of parametric and nonparametric tests:

My data : RC_Imax is 1000 x 10 matrix. It contains 1000 measurements along 10 different samples. Here is a plot of RC_Imax mean and standard deviation.

image

I would like to perform a ttest using spm1d to know if RC_max is different from 0 at some locations. I tried both parametric and nonparametric ttest, and I got two different results. The nonparametric test gave me a statistical difference but not the parametric test. Then, I performed a normality test, the data seems likely to be normally distributed along the bone.

First question: In the normality test, the residuals plot looks similar to the data plot, does it make sense? am I using the function incorrectly?

Second question (If I use the normality test correctly): You mentioned in different discussions that if there is a difference between parametric and nonparametric results we need to understand why. However, I am not sure to know how to justify these results. Considering the normality test, how would you interpret these differences between the parametric and nonparametric tests?

Please let me know if I can provide any complementary information. Thank you for your help!

Below information relative to normality test and ttest :

• Normality test: %(1) Conduct normality test: alpha = 0.05; spm = spm1d.stats.normality.k2residuals(RC_Imax'); spmi = spm.inference(0.05); disp(spmi)

%(2) Plot: close all figure('position', [0 0 1200 300]) subplot(131); plot(RC_Imax, 'k'); title('Data') subplot(132); plot(spm.residuals', 'k'); title('Residuals') subplot(133); spmi.plot(); title('Normality test')

image

• Parametric vs Nonparametric ttest :

image

jiku-pro commented 2 years ago

Q. First question: In the normality test, the residuals plot looks similar to the data plot, does it make sense? am I using the function incorrectly?

A. If the overall data mean is close to zero then the residuals will look very similar to the actual data. If the mean is exactly zero then the residuals and data are equivalent.

Q. Second question (If I use the normality test correctly): You mentioned in different discussions that if there is a difference between parametric and nonparametric results we need to understand why. However, I am not sure to know how to justify these results.

A. Parametric and nonparametric results will be identical only: (a) when there is a large number of observations, and (b) the data are normally distributed. In this case there are only 10 observations and relatively large non-normality at around point 800 in the domain. These two factors alone may explain the results differences. Another potential factor is the frequency content of the data: the data is clearly has mix of low-frequency and high-frequency content. This could also lead to differences in the results.

Q. Considering the normality test, how would you interpret these differences between the parametric and nonparametric tests?

A. The parametric and nonparametric results actually look quite similar. Yes, one reaches significance and the other doesn't, but both have maximum t values close to the threshold, so this apparent binary difference is not practically important one in my view. For example, if you had chosen a slightly different alpha value (perhaps alpha=0.04 or alpha=0.06) then the results may agree. I would therefore interpret both results similarly: both have relatively large effects, both effects would likely be larger with additional observations, but the effects are not large enough in this dataset to support a strong conclusion either way. This dataset is actually a very good example of the limitations of classical hypothesis testing's binary hypothesis rejection decision; should one regard p=0.04 and p=0.06 as substantially different or even opposite results? Probably not.

0todd0000 commented 2 years ago

(Oops! I accidentally posted the reply above from the jiku.pro GitHub account, sorry about that! Todd)

QMuentin commented 2 years ago

Thank you very much for your answer! It helps a lot, I took into account all your comments. We will make sure to be as transparent as possible in the report of these results to avoid any possible misinterpretation due to the choice of the alpha value