Skip to contents

\(Y = X'\beta + g(Z) + \epsilon\), with beta from partialling out \(E[X|Z]\) and \(E[Y|Z]\) by kernel regression. beta stays root-n even though g converges slowly – the slower nuisance rate does not contaminate the parametric one. Mirrors morie.fn.hrzplr.

Usage

morie_partially_linear(X, Z, y, h = NULL)

Arguments

X

numeric parametric regressors.

Z

numeric nonparametric covariate.

y

numeric response.

h

bandwidth.

Value

list: beta, se, residuals, root_n, n, p.

References

Horowitz, Ch. 2 (Robinson 1988).

Examples

set.seed(1)
Z <- runif(200)
X <- matrix(rnorm(400), ncol = 2)
morie_partially_linear(X, Z, X %*% c(1.5, -0.7) + sin(2 * Z))$root_n
#> [1] TRUE