Skip to contents

Local CONSTANT fit, so the boundary bias is O(h) where local linear achieves O(h^2). Mirrors morie.fn.hrznwr.

Usage

morie_nw_regression(x, y, grid = NULL, h = NULL)

Arguments

x, y

numeric regressor and response.

grid

evaluation points.

h

bandwidth.

Value

list: grid, fitted, bandwidth, n.

References

Horowitz, Ch. 2.

Examples

set.seed(1)
morie_nw_regression(rnorm(100), rnorm(100))$bandwidth
#> [1] 0.3709377