ACI: Optimal Average Coverage Confidence Interval

Description Usage Arguments Value Examples

View source: R/CI_calc.R

Description

Calculates the estimated optimal average coverage CIs, and tuning parameters associated with those CIs.

Usage

1
ACI(x_vec, sig_vec, alpha, Jn, lam_init, tol, chilen = 50)

Arguments

x_vec

a vector of observed values.

sig_vec

a vector of individual standard deviations.

alpha

a desired level of non-coverage.

Jn

the order of series approximation; do not specify its value when using the simple estimator.

lam_init

the candidate vector of minimum shrinkage factors to be used; do not specify its value when using the simple estimator.

tol

a threshold value to test for the large bias; the default is alpha/2.

chilen

the number of grid points of χ to be used in the test; the default is 50.

Value

a list with four components; lam_opt gives the value of the optimal shrinkage factor, chi_opt gives the value of the normalized half-length associated with the optimal shrinkage factor, and CI_l and CI_u gives the vector of lower and upper ends of the confidence intervals, respectively.

Examples

1
2
3
4
5
6
th_vec <- rnorm(50) + 1
sig_vec <- rnorm(50)^2 + 1
x_vec <- rnorm(50, th_vec, sig_vec)
lam_init <- c(0.3, 0.35, 0.4, 0.45)
ACI(x_vec, sig_vec, 0.05)
ACI(x_vec, sig_vec, 0.05, 2, lam_init, 0.025)

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