Determines an empirical cutoff value for statistics generated from a Monte Carlo simulation.
Usage
getcutoff(stat, alpha, reverse)
Value
returns a scalar corresponding to the quantile of the statistics determined by alpha or (1-alpha)
Arguments
stat
a vector containing statistics sampled from a Monte Carlo simulation
alpha
a p-value specifying the quantile of the statistics to be determined, e.g., (alpha x 100)th percentile
reverse
if TRUE, the quantile is determined by (1-alpha)
Author
Seung W. Choi <choi.phd@gmail.com>
Details
Calculates the quantile value of statistics sampled from a Monte Carlo simulation.
For example, when alpha = 0.1 the function determines the 1st percentile of the statistics.
Conversely, if reverse is True, the function determines the 99th percentile, i.e., (1-alpha) x 100.