ACP_check: Average Coverage Probability Diagnostics

Description Usage Arguments Details Value Examples

View source: R/Diagnostics.R

Description

Calculates the true average coverage probability of calculated confidence intervals.

Usage

1
ACP_check(th_vec, CI_l, CI_u)

Arguments

th_vec

the true mean vector

CI_l

the lower end of confidence intervals, in the same length of th_vec.

CI_u

the upper end of confidence intervals, in the same length of th_vec.

Details

This function was created for the purpose of simulations.

Value

the true average coverage probability

Examples

1
2
3
4
5
6
7
th_vec <- rnorm(50) + 1
sig_vec <- rnorm(50)^2 + 1
x_vec <- rnorm(50, th_vec, sig_vec)
ACIres <- ACI(x_vec, sig_vec, 0.05)
CI_l <- ACIres$CI_l
CI_u <- ACIres$CI_u
ACP_check(th_vec, CI_l, CI_u)

koohyun-kwon/OptACI documentation built on Oct. 6, 2020, 8:09 a.m.