[R] How to do knn regression?

Shengqiao Li shli at stat.wvu.edu
Fri Sep 19 04:17:41 CEST 2008


I want to do regression or missing value imputation by knn.  I searched 
r-help mailing list. This question was asked in 2005. ksmooth and loess 
were recommended. But my case is different. I have many predictors (p>20) 
and I really want try knn with a given k. ksmooth and loess use band width to define 
neighborhood size. This contrasts to knn's variable band width via fixing 
a k. Are there any such functions I can use in R packages?

Your help is highly appreciated.

Shengqiao Li

More information about the R-help mailing list