JeffreyRacine / R-Package-np

R package np (Nonparametric Kernel Smoothing Methods for Mixed Data Types)
https://socialsciences.mcmaster.ca/people/racinej
46 stars 18 forks source link

local linear regression with higher order kernel issue... #3

Open JeffreyRacine opened 9 years ago

JeffreyRacine commented 9 years ago

There is a glitch involving high-order kernels and local linear regression... the following replicates....

library(np)

foo <- read.table("debug.dat") x <- foo$V1 y <- foo$V2

par(mfrow=c(2,2))

g <- npreg(y~x,regtype="ll") plot(x,fitted(g))

g <- npreg(y~x,regtype="ll",ckerorder=4) plot(x,fitted(g))

g <- npreg(y~x,regtype="lc") plot(x,fitted(g))

g <- npreg(y~x,regtype="lc",ckerorder=4) plot(x,fitted(g))