ACI_aux: Optimal Average Coverage Confidence Interval under Normality...

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, using the function gnB_norm.

Usage

1
ACI_aux(x_vec, sig_vec, alpha, Jn, lam_init, Jn2)

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.

Jn2

the total order of polynomial approximation.

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)
lam_init <- c(0.3, 0.35, 0.4, 0.45)
ACI_aux(x_vec, sig_vec, 0.05, 2, lam_init, 4)

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