de_lpr: Debiased local polynomial estimation.

Description Usage Arguments Value Examples

View source: R/ChengChen.R

Description

A code provided by Gang Cheng at University of Washington (gangc at uw.edu)

Usage

1
de_lpr(X, Y, h, tau = 1, x_seq)

Arguments

X

univariate X random variable.

Y

univariate Y random variable.

h

bandwidth for estimating the regression function.

tau

ratio for bandwidths of estimating the derivative function over the bandwidth

x_seq

x data point for evaluting the local polynomial estimator.

Value

a list with estimates with original local polynomial estimation (lpr), and estimates with debiased local polynomial estimation (lpr_de).

Examples

1
2
3
4
x <- stats::runif(500, min = -1, max = 1)
y <- x + rnorm(500, 0, 1/4)
eval <- seq(from = -0.9, to = 0.9, length.out = 20)
de_lpr(x, y, 0.1, x_seq = eval)

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