FDR is typically calculated using the Benjamini-Hochberg procedure. Here’s a simplified version of the steps involved:
Rank p-values from all tests in ascending order. Calculate the FDR for each p-value using the formula: FDR = (p-value rank / total number of tests) * desired FDR level. Find the largest p-value that is less than or equal to its calculated FDR. Declare all tests with p-values less than or equal to this threshold as significant.