mafdr p-values are smaller than uncorrected?

11 views (last 30 days)
Hi, I'm running a series of False Discovery Rate corrections using mafdr(var) and the resulting FDR-adjusted p-values are coming out to be smaller than my unadjusted p-values. That doesn't jive with what I know about FDR correction. I've tried the correction on an Excel spreadsheet and got completely different values.
input code:
[var]=[1 2 3 4 5 6 7];
[FDR,q]=mafdr(var);
When I compare the output FDR to the FDR I get from an Excel spreadsheet, in some cases the uncorrected p-values might be nonsignificant (p=0.925) but the MATLAB-generated FDR-adjusted p-value will be significant (p=0.028) and the Excel-generated FDR-adjusted p-value will not be (p=0.925).
Is there something I'm doing with my input code or p-values that is leading to this error?
Thanks in advance for your help!

Answers (1)

Samayochita
Samayochita on 23 Apr 2025
Edited: Samayochita on 23 Apr 2025
Hi Caitlin,
I understand that the issue being faced is that the FDR-adjusted p-values returned by the mafdr function are coming out smaller than the original p-values, which is unexpected.
P-value means probability value. It is a statistical measure used inhypothesis testingto assess the strength of evidence against a null hypothesis.Since it is a probability, its value must range between 0 and 1, and it cannot exceed 1.
The “mafdr” functiontakesp-valuesas input, but in the above code a vector of integers[1 2 3 4 5 6 7]is being given as p-values.
Since the input numbers lie outside the specified range, the function is not behaving as expected. This is why the output is nonsensical and why the adjusted p-values can be smaller than the unadjusted ones.
I would suggest updating the code as follows:
var = [0.1 0.2 0.3 0.4 0.5 0.6 0.925];
% then use mafdr function to calculate FDR
For more information on the “mafdr” function, please refer to the documentation link given below:
Hope this was helpful.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!