EU_vec: Distance from Oracle Helper Function: Mean

View source: R/Cvec_choice.R

EU_vecR Documentation

Distance from Oracle Helper Function: Mean

Description

Calculates E U_j in Proposition 4.4 of the paper (Ver20201104)

Usage

EU_vec(Cpr, Cvec, C, Xt, Xc, mon_ind, sigma_t, sigma_c, alpha, tau_res, bmat)

Arguments

Cpr

the Lipschitz coefficient where the distance is evaluated at.

Cvec

a sequence of smoothness parameters

C

the Lipschitz coefficient for the 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.

tau_res

a list produced by the function tau_calc; can be left unspecified.

bmat

a matrix of modulus values to be used in the adaptive procedure; can be left unspecified.

Value

J-dimensional vector containing values of E U_j's.

Examples

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]
EU_vec(1/4, (1:5)/5, 2, Xt, Xc, mon_ind, sigma_t, sigma_c, 0.05)

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