Lower bound on p-value returned by corr
Mostrar comentarios más antiguos
I'm using corr to calculate the p-value for the correlation between two datasets. It keeps returning a p-value of Zero.
Does anyone know the lower-bound on this calculation? I'm guessing its 1E-250 since that's the smallest I can generate with minor perturbations to the data.
In case it matters I'm using 2011A.
2 comentarios
Pamela Reinagel
el 1 de Mzo. de 2021
We cannot report p< if we don't kow what smallest reportable p value is below which Matlab sets p=0. Moreoever some journals now require reporting exact p values and prohibit p< statements. Is there any documentation as to what the value of p is, less than which Matlab's Spearman correlation returns p=0? Or is there any way to set alpha for a Spearman correlation or force it to return the exact p value? Or is it in the nature of the mathematics that the Spearman has a finite lowest measurable p value?
the cyclist
el 1 de Mzo. de 2021
This is trickier to answer than I expected, and I don't think there is a single number that can be quoted in response.
The main reason it is tricky is that MATLAB uses a large-sample approximation (assuming your sample size is not small enough to do exactly), and how accurate this approximation will be -- and how precisely it will be reported -- is dependent on the sample size.
I figured this out via some sleuthing using the debugger, and stepping into corr and its subfunctions. Eventually, one gets to the lines where it calculates "Algorithm AS 89", as referenced at the bottom of the documentation page for corr (ref. 4).
I can think of a couple courses of action:
- Try tweaking your data "closer" to each other until you get a non-zero value. It will likely be very small. Then I believe you can accurately state that your p-value is smaller than that.
- Trying extracting your data and doing this in some other statistical software (e.g. R or SAS) and see if it reports something different from zero. (If you upload your data in a MAT file, I could try it in R.)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre F Distribution en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!