LLsharpen {sharpData} | R Documentation |
Data Sharpening for Local Linear Regression
Description
Calculation of sharpened responses for bias reduction in function and first derivative estimation, assuming a gaussian kernel is used in bivariate scatterplot smoothing.
Usage
LLsharpen(x, y, h)
Arguments
x |
a numeric vector containing the predictor variable values. |
y |
a numeric vector containing the response variable values. |
h |
a numeric vector containing the (scalar) bandwidth. |
Value
a vector containing the sharpened (i.e. perturbed) response values, ready for input into a local linear regression estimator.
Author(s)
W.J. Braun
References
Choi, E., Hall, P. and Rousson, V. (2000) Data sharpening methods for bias reduction in nonparametric regression. Annals of Statistics 28(5) 1339-1355.
See Also
locpoly
Examples
speed <- MPG[, 1]
mpg <- MPG[, 2]
h <- dpill(speed, mpg)*2
mpgSharp <- LLsharpen(speed, mpg, h)
mpg.lS <- locpoly(speed, mpgSharp, bandwidth=h, drv=1, degree=1)
mpg.lX <- locpoly(speed, mpg, bandwidth=h, drv=1, degree=1)
plot(mpg.lX, type="l") # unsharpened derivative estimation
lines(mpg.lS, col=2, lty=2) # sharpened derivative estimation
[Package sharpData version 1.4 Index]