Skip to content
Prev 87131 / 398506 Next

locpoly

On 2/23/2006 9:56 AM, Amir Safari wrote:
You could use linear interpolation on its outputs, e.g.

x <- runif(20)
y <- x^2 + rnorm(20)

fit <- locpoly(x, y, bandwidth=0.3)
fitfn <- approxfun(fit$x, fit$y)
yhat <- fitfn(x)

Duncan Murdoch