bw_opt: Optimal bandwidths under Lipschitz class

Description Usage Arguments Value

View source: R/opt_bw.R

Description

Calculates the optimal bandwidths for regression function value estimator under Lipschitz class

Usage

1
bw_opt(y, x, t, TE = FALSE, d = NULL, M, kern, alpha, bw.eq = TRUE, p = 1)

Arguments

y

vector of dependent variables

x

a vector of regressors.

t

a scalar evaluation point.

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.

M

bound on the first derivative

kern

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

alpha

determines confidence level 1 - alpha.

bw.eq

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

p

Hölder exponent, either p = 1 or p = 2. Default is p = 1.

Value

a list with the following components

h.opt

the optimal bandwidth; when TE = TRUE, return two bandwidths for estimators for treatment and control groups.

hl.opt

the optimal half-length when the optimal bandwidth(s) is used.

b.opt

the bias corresponding to the optimal bandwidth h.opt.

sd.opt

the standard deviation corresponding to the optimal bandwidth h.opt.


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