Number of replicates needed for a target Monte Carlo standard error
Source:R/simulation.R
sim_n_required.RdPlanning formulas from Morris, White and Crowther (2019, Section 5.3). For proportions (coverage, rejection rates), \(n = p(1-p)/\mathrm{MCSE}^2\); for bias, \(n = \sigma^2/\mathrm{MCSE}^2\), where \(\sigma\) is the anticipated empirical standard error of the estimator.
Usage
sim_n_required(
target_mcse,
measure = c("proportion", "bias"),
p = 0.5,
sd = NULL
)