coverage {simMetric} | R Documentation |
Calculate the coverage
Description
Estimate the coverage and the Monte Carlo standard error of this estimate given a vector of confidence intervals and the true value.
Usage
coverage(
true_value,
ll,
ul,
get = c("coverage", "coverage_mcse"),
na.rm = FALSE,
...
)
Arguments
true_value |
The true value which should be covered by the interval. |
ll |
A numeric vector containing the lower limits of the confidence intervals. |
ul |
A numeric vector containing the upper limits of the confidence intervals. |
get |
A character vector containing the values returned by the function. |
na.rm |
A logical value indicating whether NA values for ll and ul should be removed before coverage estimation. |
... |
Additional arguments to be ignored. |
Value
A named vector containing the estimate and the Monte Carlo standard error for the coverage.
Examples
coverage(true_value=0, ll=c(-1, -1, -1, -1), ul=c(1, 1, 1, -0.5))
[Package simMetric version 0.1.1 Index]