JeffreyRacine / R-Package-np

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

Local linear model for npindexbw and npindex does not work #20

Closed cc20002002 closed 5 years ago

cc20002002 commented 5 years ago

bw <- npindexbw(as.formula(paste('',colnames(wide)[2], "~", paste(colnames(wide)[3:ncol(wide)], collapse = "+"), sep = "")),data = wide,regtype='ll') model <- npindex(bws=bw,regtype='ll',newdata=to_predict2,eval=to_predict2,y.eval=T)

model

Single Index Model Regression data: 27 training points, and 1 evaluation points, in 2 variable(s) c15020 c15235 Beta: 1 0.2669616 Bandwidth: 2.714933 Kernel Regression Estimator: Local-Constant

Continuous Kernel Type: Second-Order Gaussian No. Continuous Explanatory Vars.: 1

JeffreyRacine commented 5 years ago

Greetings,

The single-index model only supports the local constant estimator (it is an implementation of Ichimura's and Klein and Spady's methods, not an extension to the local polynomial setting).

Jeff