ci-assessment: Assessment of CI methods

Description Usage Arguments Value References Examples

Description

Functions to compute the coverage probability of a confidence interval method.

Usage

1
  coverageProbability(pars, fun = acCi, n_sample = 1e4, min_k, ...)

Arguments

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'.

Value

The 'data.frame' object 'pars' with additional columns 'cp' for the coverage probability and 'aw' average confidence interval width.

References

Fagerland, Morten W., Stian Lydersen, and Petter Laake. Recommended Confidence Intervals for Two Independent Binomial Proportions. Statistical Methods in Medical Research (2011).

Examples

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)

julian-gehring/Rariant documentation built on May 20, 2019, 4:20 a.m.