ci_reg_Hol: Confidence interval for regression function value for Hölder...

Description Usage Arguments Value References Examples

View source: R/ci_const.R

Description

Constructs a confidence interval for regression function value for Hölder space based on the optimal one-sided procedure of Armstrong and Kolesár (2020).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ci_reg_Hol(
  y,
  x,
  point,
  C,
  level,
  kern = "triangular",
  se.initial = "EHW",
  se.method = "nn",
  J = 3,
  cv = NULL,
  TE = FALSE,
  d = NULL,
  bw.eq = TRUE
)

Arguments

y

a vector of dependent variable

x

a vector of regressor

point

point where the regression function value would be evaluated

C

bound on the second derivative

level

confidence level of each one-sided confidence intervals

kern

specifies kernel function used in the local regression; default = "triangular". See NPROptBW.fit in RDHonest package for a list of kernels available.

se.initial

method for estimating initial variance for computing optimal bandwidt; default = "EHW". See NPROptBW.fit in RDHonest package for a list of method available.

se.method

methods for estimating standard error of estimate; default = "nn". See NPRreg.fit in RDHonest package for a list of method available.

J

number of nearest neighbors, if "nn" is specified in se.method.

cv

supplied value of critical value to be used in constructing confidence interval; default is cv = NULL.

TE

logical specifying whether there are treatment and control groups.

d

a vector of indicator variables specifying treatment and control group status; relevant only when TE = TRUE.

bw.eq

if TRUE, the same bandwidths are used for estimators for treatment and control groups; relevant only when TE = TRUE.

Value

a vector of lower and upper ends of the confidence interval and a pair of bandwidths used for the treatment and control groups.

References

Armstrong, Timothy B., and Michal Kolesár. 2020. "Simple and Honest Confidence Intervals in Nonparametric Regression." Quantitative Economics 11 (1): 1–39.

Examples

1
2
3
x <- stats::runif(500, min = -1, max = 1)
y <- x + rnorm(500, 0, 1/4)
ci_reg_Hol(y, x, 1/2, 1, 0.99)

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