[R] gaussian Kernel smoothing using Nadaraya-Watson estimator and confidence bands

IOANNA IOANNOU ii54250 at msn.com
Thu Mar 5 11:46:22 CET 2015


Hello, 

I have a database and I would like to fit a Nadaraya-Watson Gaussian kernel
estimator and produce the confidence bands around the  mean estimate. Any
ideas how to do this with R? I cannot find a way to produce the confidence
bands. I will use a fixed bandwidth. 


Lets use this database for illustration purposes:

d <- data.frame(x = runif(N))
d$y <- d$x^2 - d$x + 1 + (1+d$x)*rnorm(N, sd = 0.1)


Any help much appreciated. 


Best, 
Ioanna



More information about the R-help mailing list