Nonparametric-Regression Resources in R

This is not meant to be an exhaustive list. Boldfaced functions and packages are of special interest (in my opinion). See the web appendix on Nonparametric Regression from my R and S-PLUS Companion to Applied Regression (Sage, 2002) for a brief introduction to nonparametric regression in R.


In the stats package, attached by default at start-up:

ksmooth: Coordinates for kernel-regression scatterplot smoother.

loess: Nearest-neighbour local-polynomial regression.

loess.smooth: Coordinates for nearest-neighbour local-polynomial scatterplot smoothing.

lowess: Coordinates for nearest-neighbour local-polynomial scatterplot smoothing.

ppr: Projection-pursuit regression.

scatter.smooth: Scatterplot with loess smooth.

smooth.spline: Coordinates for smoothing-spline scatterplot smoother.

supsmu: Coordinates for the "super-smoother" scatterplot smoother.

In packages supplied with the standard R distribution:

locpoly (in package KernSmooth): Local polynomial scatterplot smoother.

gam (in mgcv): Generalized additive models with degrees of freedom of terms selected by generalized cross-validation; uses smoothing splines.

nnet (in nnet): Neural networks; associated with Venables and Ripley (2002).

bs and ns (in splines): Generate B-spline and natural-spline regression-spline bases for use in linear and generalized-linear (etc.) models.

pspline (in survival): Smoothing splines for Cox survival-regression models.

rpart (in rpart): Classification and regression trees.

In other packages available on CRAN (the Comprehensive R Archive Network):

ace and avas (in acepack): Finds linearizing nonparametric transformations of the response and predictors in a regression, using the ACE (alternating conditional expectations) or AVAS (additivity and variance stabilization) algorithms.

nnr, slm, snm, snr, ssr (in assist): Functions for fitting a variety of spline-based nonparametric and semi-parametric regression models.

aws (in aws): Local-polynomial regression with up to three predictors.

cobs (in cobs): Constrained b-spline quantile scatterplot smoother.

gam (in gam): Generalized additive models using smoothing splines or local polynomial regression; associated with Hastie and Tibshirani (1990).

ssanova and gssanova (in gss): additive and generalized-additive regression models using splines.

ipredbagg in (ipred): Improved predictions by "bagging" for classification and regression trees.

lpridge and lpepa (in lpridge): Local polynomial scatterplot smoother.

locfit (in locfit): Local polynomial regression; associated with Loader (1999).

glkerns and lokerns (in lokern): Kernel-regression scatterplot smoothers.

bruto and mars (in mda): Additive regression models.

polymars (in polspline): Multivariate additive regression models.

smooth.Pspline and sm.spline (in pspline): Smoothing-spline scatterplot smoother.

randomForest (in randomForest): Classification and regression trees.

rqss (in quantreg): Additive quantile-regression models (e.g., for median, quartiles, etc.).

sm.regression and others (in sm): Local linear regression with one or two predictors; associated with Bowman and Azzalini (1997).

tree in (tree): classification and regression trees (similar to rpart); associated with Venables and Ripley (2002)

As well, the fields and spatial packages for spatial data analysis (the latter included in the standard R distribution, and associated with Venables and Ripley, 2002) provide for smoothing. There are also several packages for wavelet smoothing (ebayesthresh, Rwave, waveslim, wavethresh).


Last Modified: 20 April 2005 by J. Fox <jfox AT mcmaster.ca>