ACI_orc: Oracle Average Coverage Confidence Interval

Description Usage Arguments Details Value Examples

View source: R/CI_calc.R

Description

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

Usage

1
ACI_orc(th_vec, sig_vec, alpha, x_vec, min_lam = 0.01)

Arguments

th_vec

the true mean vector

sig_vec

a vector of individual standard deviations.

alpha

a desired level of non-coverage.

x_vec

a vector of observed values; it can be unspecified if only the shrinkage factor and the half-length are calculated.

min_lam

the minimum value of the shrinkage factor to be used in optimization; default is 0.01.

Details

This function was created for the purpose of simulations.

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
th_vec <- rnorm(50) + 1
sig_vec <- rnorm(50)^2 + 1
x_vec <- rnorm(50, th_vec, sig_vec)
ACI_orc(th_vec, sig_vec, 0.05)
ACI_orc(th_vec, sig_vec, 0.05, x_vec)

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