tau_calc | R Documentation |
Calculates the (non-)coverage probabilities of individual confidence intervals that ensure the proper coverage of the intersection confidence interval.
tau_calc( Cvec, Cbar, Xt, Xc, mon_ind, sigma_t, sigma_c, alpha, num_sim = 10^5, delta_init = 1.96, bmat_init )
Cvec |
a sequence of smoothness parameters |
Cbar |
the Lipschitz coefficient for the largest function space we consider |
Xt |
n_t by k design matrix for the treated units. |
Xc |
n_c by k design matrix for the control units. |
mon_ind |
index number for monotone variables. |
sigma_t |
standard deviation of the error term for the treated units (either length 1 or n_t). |
sigma_c |
standard deviation of the error term for the control units (either length 1 or n_c). |
alpha |
desired upper quantile value. |
num_sim |
number of simulations used to calculate the quantile;
the default is |
delta_init |
the value of δ to be used in simulating the quantile; theoretically, its value does not matter asymptotically. Its default value is 1.96. |
bmat_init |
the matrix of modulus values corresponding to |
This solves (19) of our paper, using the asymptotic argument provided in the paper.
a list of two values, del_sol
, the proper value of δ to be used
for individual CIs, and tau_sol
, the non-coverage probability associated with the
value of δ.
n <- 500 d <- 2 X <- matrix(rnorm(n * d), nrow = n, ncol = d) tind <- X[, 1] < 0 & X[, 2] < 0 Xt <- X[tind == 1, ,drop = FALSE] Xc <- X[tind == 0, ,drop = FALSE] mon_ind <- c(1, 2) sigma <- rnorm(n)^2 + 1 sigma_t <- sigma[tind == 1] sigma_c <- sigma[tind == 0] tau_calc((1:5)/5, 1, Xt, Xc, mon_ind, sigma_t, sigma_c, 0.05) tau_calc((1:5)/5, Inf, Xt, Xc, mon_ind, sigma_t, sigma_c, 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.