Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F-scores with undefined parametric F-test are given p-values of zero #134

Open
BryanGuillaume opened this issue Jul 16, 2019 · 3 comments
Open

Comments

@BryanGuillaume
Copy link
Collaborator

In swe_contrasts, when the estimated number of degrees of freedom is smaller than the constrat rank minus 1 (i.e. when edf < rankContrast - 1), the parametric F-test is undefined because we have (edf - rankContrast + 1)/ edf * (F-score / rankContrast) ~ F(rankContrast, edf - rankContrast + 1). In this scenario, the toolbox currently sets the score and the equivalent score to 0, but also set the p-value to zero, which may not be adequate:

uncP(score == 0) = 0;

I believe that would be fine if SPM treats all zero values as nan, but I am not sure about the latter. So I see thee options here:

  1. Leave the code as is provided SPM treats zero as missing, but I doubt that is a good solution
  2. Leave the scores set to 0, but set the p-values to 1.
  3. Nan the scores and p-values.

One could also argue that setting the F-scores to 0 may not be appropriate, because it is actually defined, only its estimated parametric distribution is not defined.

@nicholst, do you have any opinion about this?

@nicholst
Copy link
Collaborator

nicholst commented Jul 17, 2019 via email

@BryanGuillaume
Copy link
Collaborator Author

Hi Tom, I have just tested this on an example and that seems a reasonable solution. From my tests, I only encounter negative scores with the classic SwE because the edf approximation tends to underestimate the true edf (as a quick reminder, that is coming from a small sample bias that decreases quickly when the modified SwE is used).

For the sake of visualising how the p-values would change after clamping the edf estimate to the contrast rank, here below a plot of the -log10(p-values before and after clamping) vs the -log10(p-values of the modified SwE version without clamping). Note tha,t in this example, I have 12 subjects with 33% of missing data and a test of rank 4. Thus, this is a quite challenging test.

Before clamping the edf to rankContrast

Screenshot 2019-07-17 at 10 47 58

After clamping the edf to rankContrast

Screenshot 2019-07-17 at 10 48 05

@nicholst
Copy link
Collaborator

nicholst commented Jul 17, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants