CI_minimax_RD | R Documentation |
Calculates the minimax confidence interval.
CI_minimax_RD( Yt, Yc, Xt, Xc, C_max, mon_ind, se.method = c("nn", "supplied", "nn.test"), se.init = c("Silverman", "nn", "supplied", "supp.sep", "S.test"), t.dir = c("left", "right"), alpha, N = 3, sigma_t, sigma_c, sigma_t.init, sigma_c.init, opt_b = NULL, min_half_length = NULL, maxb.const = 10, Prov.Plot = FALSE, len.return = FALSE )
Yt |
outcome value for the treated group observations. |
Yc |
outcome value for the control group observations. |
Xt |
n_t by k design matrix for the treated units. |
Xc |
n_c by k design matrix for the control units. |
C_max |
the worst-case smoothness parameter. |
mon_ind |
index number for monotone variables. |
se.method |
the standard deviation estimation method. |
se.init |
the standard deviation estimation method for choosing an optimal estimator. |
t.dir |
treatment direction; |
alpha |
the desired level of non-coverage |
N |
the number of neighbors to be used when |
sigma_t |
supplied variance for treated observations. |
sigma_c |
supplied variance for control observations. |
sigma_t.init |
supplied first-stage variance for treated observations. |
sigma_c.init |
supplied first-stage variance for control observations. |
opt_b |
provided if the optimal modulus value is known; '
default is |
min_half_length |
provided if the optimal half-length is known;
default is |
maxb.const |
governs the optimization range; default is 10. |
Prov.Plot |
if |
len.return |
if |
So far, conditional variance estimation works only for one-dimensional case.
returns a list with the confidence interval (ci
),
the standard deviation #' of the estimator (sd
),
and the bandwidths used for the treated observations and the control
observations (h.t
and h.c
)
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] Yt <- 1 + rnorm(length(sigma_t), mean = 0, sd = sigma_t) Yc <- rnorm(length(sigma_c), mean = 0, sd = sigma_c) C_max <- 1 CI_minimax_RD(Yt, Yc, Xt, Xc, C_max, mon_ind, "nn.test", "S.test", alpha = 0.05) d <- 1 X <- rnorm(n) tind <- X < 0 Xt <- X[tind == 1] Xc <- X[tind == 0] mon_ind <- 1 sigma <- rep(1, n) sigma_t <- sigma[tind == 1] sigma_c <- sigma[tind == 0] Yt <- 1 + rnorm(length(sigma_t), mean = 0, sd = sigma_t) Yc <- rnorm(length(sigma_c), mean = 0, sd = sigma_c) CI_minimax_RD(Yt, Yc, Xt, Xc, C_max, mon_ind, "nn", "Silverman", t.dir = "left", alpha = 0.05) CI_minimax_RD(Yt, Yc, Xt, Xc, C_max, mon_ind, "nn", "nn", t.dir = "left", alpha = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.