LPReg: Local polynomial regression at a point, normalized to 0

Description Usage Arguments Note

View source: R/RDfunctions.R

Description

Calculate estimate of a function at a point and its variance given a bandwidth using local polynomial regression of order order.

Usage

1
LPReg(X, Y, h, K, order = 1, se.method = NULL, sigma2, J = 3)

Arguments

Y, X

Outcome variable and regressor

h

Bandwidth

K

Kernel function

order

Order of local regression 1 for linear, 2 for quadratic, etc.

se.method

Vector with methods for estimating standard error of estimate. If NULL, standard errors are not computed. The elements of the vector can consist of the following methods:

"nn"

Nearest neighbor method

"EHW"

Eicker-Huber-White, with residuals from local regression (local polynomial estimators only).

"demeaned"

Use EHW, but instead of using residuals, estimate sigma^2_i by subtracting the estimated intercept from the outcome (and not subtracting the estimated slope). Local polynomial estimators only.

"plugin"

Plug-in estimate based on asymptotic variance. Local polynomial estimators in RD only.

"supplied.var"

Use conditional variance supplied by sigma2 / d instead of computing residuals

sigma2

Optionally, supply estimates of σ^{2}_{i} (for "supplied.var" se.method)

J

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

Note

Nearest neighbor method assumes data are sorted so that X[i] <= X[i+1]


kolesarm/RDHonest documentation built on April 3, 2018, 11:08 a.m.