Description Usage Arguments Value References Examples
Functions to compute the coverage probability of a confidence interval method.
1 | coverageProbability(pars, fun = acCi, n_sample = 1e4, min_k, ...)
|
pars |
Data frame with parameter combinations [data.frame] |
n_sample |
Number of assessments per parameter combination [integer(1)]. |
fun |
CI function |
min_k |
Minimum 'k2' value to use. |
... |
Additional arguments that are passed on to 'fun'. |
The 'data.frame' object 'pars' with additional columns 'cp' for the coverage probability and 'aw' average confidence interval width.
Fagerland, Morten W., Stian Lydersen, and Petter Laake. Recommended Confidence Intervals for Two Independent Binomial Proportions. Statistical Methods in Medical Research (2011).
1 2 3 4 5 6 7 | ## Define parameter space
pars = expand.grid(k1 = 1:5, k2 = 5, n1 = 30, n2 = 30)
conf_level = 0.95
## Compute coverage probabilities
cp = coverageProbability(pars, fun = acCi, n_sample = 1e2, conf_level = conf_level)
print(cp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.