Why Simulate Multiple-Testing Procedures?
A procedure’s theoretical guarantee is conditional on assumptions about the p-values, their dependence, and the null hypotheses. Genomic tests can be dependent, and a guarantee under one dependence condition does not automatically extend to every correlation pattern. A simulation makes the design assumptions explicit and shows how procedures behave in repeated data sets with known truth. It is a comparison under chosen conditions, not a proof of performance in every genomic study.
The central quantities are calculated separately in each simulated data set. Their averages over many replicates describe performance under the specified data-generating mechanism. In particular, the false discovery rate is an expectation of the false discovery proportion; it is not generally the proportion of all tests that are null or the probability that any particular finding is false.
Specify the Simulation Before Comparing Procedures
A useful design records the true null status of every hypothesis, the distribution of each test statistic under the null and alternative, and the dependence structure among statistics. The null p-values should be marginally valid: for each true null and every \(u\) between 0 and 1, \(P(p_i\leq u)\leq u\). Under a continuous exact null, this probability equals \(u\). Otherwise, an apparent excess of false discoveries may reflect invalid p-values rather than a failure of the multiple-testing rule.
For a basic mixture design, choose \(m\) tests and a known null proportion \(\pi_0=m_0/m\), where \(m_0\) is the number of true nulls. For example, null p-values can be uniform and alternative p-values can follow a distribution concentrated near zero, such as a Beta distribution with parameters \(a<1\) and 1. This specifies the marginal distributions, but not their dependence: that must be specified separately.
Use the same simulated p-values for all procedures in each replicate. This paired comparison prevents differences between procedures from being confounded with differences in the generated data. The procedures being compared are:
- BH: sort the p-values \(p_{(1)}\leq\cdots\leq p_{(m)}\), and find the largest \(k\) such that \(p_{(k)}\leq \alpha k/m\). Reject the hypotheses with ranks 1 through \(k\); if no such \(k\) exists, make no rejections.
- Storey q-values: estimate \(\pi_0\) using a preselected tuning value \(\lambda\), then calculate monotone q-values from the ordered p-values. In this tutorial, \(\hat{\pi}_0(\lambda)=\min\{1,\#\{p_i>\lambda\}/[m(1-\lambda)]\}\), and the ordered q-value is \(q_{(i)}=\min\{1,\min_{j\geq i}[\hat{\pi}_0m p_{(j)}/j]\}\). Reject when \(q_i\leq\alpha\). This is one explicit estimator and implementation choice; results can depend on that choice.
- BY: let \(H_m=\sum_{j=1}^m 1/j\). Find the largest \(k\) such that \(p_{(k)}\leq \alpha k/(mH_m)\), and reject ranks 1 through \(k\). This more conservative threshold is designed to control FDR under arbitrary dependence when the p-values are valid.
BH has FDR control under independence and under the PRDS conditions covered in the earlier material on dependence and FDR control. BY offers a guarantee under arbitrary dependence, at the cost of a more stringent threshold. Storey’s method estimates the null proportion and can gain power when \(\pi_0\) is below 1, but its performance depends on the estimator and assumptions. A simulation can compare observed behavior; it should not be used to claim a guarantee outside a procedure’s conditions.
Worked Example: Calculate FDP and Power in One Replicate
Suppose there are 10 tests: hypotheses 1 and 3 are false nulls, and the other 8 are true nulls. Their ordered p-values are \(0.001, 0.008, 0.018, 0.040, 0.070, 0.120, 0.210, 0.510, 0.700, 0.800\). Take \(\alpha=0.10\), and suppose ranks 1 and 3 are the false nulls.
For BH, the thresholds at ranks 1 through 5 are \(0.010, 0.020, 0.030, 0.040,\) and \(0.050\). The fourth p-value meets its threshold, since \(0.040\leq0.040\), but the fifth does not, since \(0.070>0.050\). No later rank meets its threshold, so BH rejects ranks 1 through 4. Two rejections are false discoveries and two are true discoveries. Therefore \(\mathrm{FDP}=2/4=0.50\), and power is \(2/2=1.00\) in this replicate.
For Storey’s method with \(\lambda=0.50\), three p-values exceed \(\lambda\). Thus \(\hat{\pi}_0=\min\{1,3/[10(1-0.50)]\}=0.60\). The q-value at rank 5 is \(0.084\): the rank-5 ratio is \(0.60(10)(0.070)/5=0.084\), and subsequent ratios are larger. The q-value at rank 6 is \(0.120\), so ranks 1 through 5 are rejected at level 0.10. This gives \(V=2\), \(S=3\), \(\mathrm{FDP}=2/5=0.40\), and power \(3/2=1.50\) would be impossible, revealing an inconsistency in the stated truth assignment: only two hypotheses are false. Here rank 5 is a true null, so \(S=2\), not 3. The corrected power is \(2/2=1.00\), and the fifth rejection increases \(R\) and \(V\) by one.
For BY, \(H_{10}=2.929\) to three decimal places. The rank-1 threshold is \(0.10/[10(2.929)]=0.0034\), which the first p-value meets. The rank-2 threshold is \(0.20/[10(2.929)]=0.0068\), which the second p-value exceeds; no later rank meets its threshold. BY rejects only rank 1, a false null, so \(\mathrm{FDP}=1/1=1.00\) and power is \(1/2=0.50\). These are results for one hypothetical replicate, not estimates of FDR or average power.
Dependence Patterns and a Fully Specified Design
The simulation should vary dependence while retaining valid marginal null p-values and the same underlying truth pattern. One practical design generates one-sided Gaussian test statistics. Under a true null, \(Z_i\sim N(0,1)\) and \(p_i=1-\Phi(Z_i)\), where \(\Phi\) is the standard normal cumulative distribution function. Under an alternative, use \(Z_i\sim N(\delta,1)\) with \(\delta>0\); larger values tend to produce smaller p-values. Fix which tests are null and which are alternative in advance, or randomly assign statuses according to a stated mixture rule and retain each replicate’s truth labels for scoring.
For independent statistics, generate each \(Z_i\) independently. For positively dependent blocks, generate each block from a multivariate normal distribution with unit marginal variances and positive within-block correlations. For a negative-dependence comparison, pair statistics with correlation \(-0.60\). A two-variable correlation matrix with this value has eigenvalues \(1-0.60=0.40\) and \(1+0.60=1.60\), both positive, so it is a valid covariance matrix. These are illustrative dependence patterns, not models that represent every linkage structure.
Each null statistic remains standard normal in these designs, so its one-sided p-value is uniform marginally, even when statistics are correlated. That checks marginal null validity; it does not establish PRDS. In particular, do not infer that a positive correlation matrix automatically establishes the exact dependence conditions required for a theoretical guarantee in every test construction.
Worked Example: A Repeated Simulation and Monte Carlo Error
Consider a hypothetical simulation with \(m=1000\), \(\pi_0=0.90\), \(\alpha=0.05\), and \(B=2000\) independent replicates. Suppose the data-generating mechanism uses valid null p-values and independent test statistics. For each replicate, apply all three procedures to the same p-values, record FDP and power, and average each measure over the 2000 replicates.
Suppose the simulated mean FDPs are 0.049 for BH, 0.051 for Storey, and 0.018 for BY; the corresponding mean powers are 0.42, 0.48, and 0.19. These hypothetical results suggest similar empirical FDR for BH and Storey and a lower empirical FDR and power for BY under this design. They do not prove that Storey controls FDR, or that BH will control it under another dependence structure.
For BH, suppose the sample standard deviation of replicate FDP values is 0.16. The Monte Carlo standard error of the mean FDP is approximately \(0.16/\sqrt{2000}=0.00358\). If the corresponding standard deviation for Storey FDP is 0.17, its Monte Carlo standard error is \(0.17/\sqrt{2000}=0.00380\). These quantify simulation noise in the estimated means, not uncertainty from choosing an unrealistic data-generating model. The standard error formula uses the replicate-level standard deviation, because FDP values need not be binary.
Summarize, Diagnose, and Compare
A clear report includes the number of tests, null proportion, alternative effect distribution, dependence structure, significance level, number of replicates, Storey estimator and tuning value, and the precise definition of power. Report mean FDP as the empirical FDR estimate and mean power, together with Monte Carlo standard errors or intervals. If the number of rejections matters for the scientific use case, also summarize its distribution; equal mean FDPs can conceal substantially different discovery counts.
The following hypothetical results illustrate how dependence comparisons might be presented. Each cell reports empirical mean FDP / mean power for a specified design. They are not universal expected values.
| Dependence design | BH | Storey q-values | BY |
|---|---|---|---|
| Independent | 0.049 / 0.42 | 0.051 / 0.48 | 0.018 / 0.19 |
| Positive blocks | 0.047 / 0.39 | 0.050 / 0.45 | 0.017 / 0.17 |
| Negative pairs | 0.074 / 0.44 | 0.079 / 0.50 | 0.030 / 0.20 |
In this hypothetical comparison, the first two designs show similar empirical FDP for BH and Storey, while the negative-pair design shows higher empirical FDP for both. BY is more conservative in all three. Interpretation depends on Monte Carlo error: differences similar in size to their uncertainty should not be described as clear evidence of different performance.
Investigate unexpected results by checking the generated marginal null p-value distributions, the realized null proportion, the correlation matrices, and the code that assigns truth labels. Plot or summarize replicate-level FDP and rejection counts, not only their means; a small number of replicates with large FDP can affect the average. Run enough replicates for the desired Monte Carlo precision, and repeat key comparisons across plausible effect sizes, null proportions, and dependence strengths.
Common alternatives include comparing procedures using analytic guarantees, or using permutations and resampling schemes to model dependence from observed data. Guarantees answer what can be established under assumptions; simulations answer what happens under the specific model implemented. A model-based simulation is easier to control and interpret, but may not capture features such as heterogeneous effects, imperfect calibration, or complex genomic dependence. A favorable simulated result cannot repair invalid marginal p-values, and a single simulated dependence pattern cannot stand in for all arbitrary dependence.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A replicate has \(V=3\), \(R=12\), \(S=9\), and \(m_1=15\). Find its FDP and power.
- Why must all three procedures be applied to the same simulated p-values within each replicate?
- Under a valid negative-dependence design, an empirical BH FDR estimate exceeds \(\alpha\). Does this alone refute a BH guarantee under PRDS?
- What does a Monte Carlo standard error quantify, and what does it not quantify?
Solutions. (1) \(\mathrm{FDP}=3/12=0.25\), and power is \(9/15=0.60\). (2) Reusing the same p-values makes the comparison paired: procedure differences are not mixed with random variation from generating different data sets. (3) No. The design may not satisfy PRDS, and an empirical estimate also has Monte Carlo error; a guarantee under PRDS does not apply automatically to negative dependence. (4) It quantifies simulation error in the estimated mean across a finite number of replicates. It does not measure how well the simulation model represents the genomic setting of interest.