ci_reg_Lip: Confidence interval for regression function value for...

Description Usage Arguments Value Examples

View source: R/ci_const.R

Description

Constructs a confidence interval for regression function value for Lipschitz space; it can be used to deal with both regression function value itself and difference between regression function values of treatment and control groups.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ci_reg_Lip(
  y,
  x,
  point,
  C,
  level,
  TE = FALSE,
  d = NULL,
  kern = "tri",
  bw.eq = TRUE,
  se.method = "resid",
  cv = NULL
)

Arguments

y

vector of dependent variables

x

a vector of regressors.

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

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.

kern

a string for kernel name; currently "tri" is supported.

bw.eq

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

se.method

methods for estimating standard error of estimate; currently, only "resid" is supported.

cv

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

Value

a vector of lower and upper ends of confidence interval, and a pair of bandwidths used for the treatment and control groups; if TE = FALSE, those two bandwidths have the same value.

Examples

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

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