CI_length_RD | R Documentation |
Calculates the minimum half-length, as a function of the modulus value.
CI_length_RD(b, C, Xt, Xc, mon_ind, sigma_t, sigma_c, alpha)
b |
point where the inverse modulus is evaluated at. |
C |
a scalar smoothness parameter. |
Xt |
n_t by d design matrix for the treated units. |
Xc |
n_c by d 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 |
the desired level of non-coverage probability. |
In the paper, the minimum half-length is expressed as a function of δ; here, we use the relationship that δ is the inverse modulus value given b. The returned value will be minimized with respect to b later
the minimum half-length corresponding to the modulus value b
X <- matrix(rnorm(500 * 2), nrow = 500, ncol = 2) tind <- X[, 1] > 0 & X[, 2] > 0 Xt <- X[tind == 1, ,drop = FALSE] Xc <- X[tind == 0, ,drop = FALSE] sigma <- rnorm(500)^2 + 1 sigma_t <- sigma[tind == 1] sigma_c <- sigma[tind == 0] CI_length_RD(1.1, 1/2, Xt, Xc, c(1, 2), sigma_t , sigma_c, 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.