CI_length_RD: Minimum Half-length Function

View source: R/CI_mm.R

CI_length_RDR Documentation

Minimum Half-length Function

Description

Calculates the minimum half-length, as a function of the modulus value.

Usage

CI_length_RD(b, C, Xt, Xc, mon_ind, sigma_t, sigma_c, alpha)

Arguments

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.

Details

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

Value

the minimum half-length corresponding to the modulus value b

Examples

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)

koohyun-kwon/rdadapt documentation built on May 8, 2022, 8:49 p.m.