\begin{Schunk}
\begin{Sinput}
 fit1 <- locfit(y~lp(x,nn=0.5)) 
 pred1 <- predict(fit1, newdata=data.frame(x), se.fit=TRUE, band="local")
 plot(fit1,main="Local fitting, 0.5 nearest neighbors included",ylim=c(-6,6), band="local")
 points(x,y)
\end{Sinput}
\end{Schunk}
