calc_rejection_rate: Calculate Rejection Rate and its Monte Carlo Standard Error
Description
Computes the rejection rate of hypotheses tests based on a vector of p-values and a specified
significance level (alpha). The rejection rate is the proportion of p-values that are lower than
alpha, indicating significant results. Additionally, the function calculates the Monte Carlo
Standard Error (MCSE) for the rejection rate, which quantifies the uncertainty associated with
the estimated rejection rate. This function is useful for assessing the overall type I error rate
or the power of a statistical test across multiple simulations or experimental replications.
Usage
calc_rejection_rate(p_values, alpha = 0.05)
Value
A list with two components: `rejection_rate`, the proportion of tests that resulted in
rejection of the null hypothesis, and `rejection_rate_mcse`, the Monte Carlo Standard Error of the
rejection rate, providing an estimate of its variability.
Arguments
p_values
A numeric vector of p-values from multiple hypothesis tests.
alpha
The significance level used to determine if a p-value indicates a significant result.
Default is 0.05.