all_gen: Coverage and length results generation

Description Usage Arguments Value

View source: R/sim_funs.R

Description

Generates 1) coverage indicator, 2) confidence band lengths at each evaluation points and 3) bandwidths used at each evaluation points given a confidence band.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
all_gen(
  eval,
  cb.l,
  cb.u,
  h.t,
  h.c = h.t,
  reg.name = c("AK", "AK.bin", "custom"),
  reg.spec,
  M,
  cvar.spec = NULL,
  scale = NULL,
  x.spec,
  custom.fx = NULL
)

Arguments

eval

a vector of evaluation points in the support of the regressor

cb.l

a vector of lower confidence band values

cb.u

a vector of upper confidence band values

h.t

bandwidth used at each evaluation points for treated observations or for all observations if there is no treated/control distinction.

h.c

bandwidth used at each evaluation points for control observations; it can be left unspecified if there is no treated/control distinction.

reg.name

class of regression functions to be used; "AK" denotes regression functions in Section 5 of Armstrong and Kolesár (2020); "AK.bin" denotes denotes the case where y = 1(f(x) + u > 0), using regression functions in Section 5 of Armstrong and Kolesár (2020), where u is a normal random variable.

reg.spec

a number denoting the type of regression function among the class of functions chosen in reg.name.

M

bound on the second derivative

cvar.spec

specification for conditional variance function, one of c("homo", "het.AK").

scale

scale parameter, a positive constant multiplied to the noise.

x.spec

distribution of the regressor, which determines the weights. Supports the uniform distribution ("unif") and the normalized beta(2, 2) distribution ("beta"), both with the support of [-1, 1].

custom.fx

a vector of custom f(x) values

Value

a vector of 1) coverage indicator, 2) weighted length, 3) supremum length, 4) a vector of confidence band lengths at each evaluation points 5) a vector of bandwidths used at each evaluation points given a confidence band for treated and control observations, 6) a vector of evaluation points 7) a vector of "lower non-coverage length" 8) a vector of "upper non-coverage length"


koohyun-kwon/HTEBandSim documentation built on Dec. 21, 2021, 7:43 a.m.