backf.cl {RBF} | R Documentation |
Classic Backfitting
Description
This function computes the standard backfitting algorithm for additive models.
Usage
backf.cl(
formula,
data,
subset,
point = NULL,
windows,
epsilon = 1e-06,
degree = 0,
prob = NULL,
max.it = 100
)
Arguments
formula |
an object of class |
data |
an optional data frame, list or environment (or object coercible
by as.data.frame to a data frame) containing the variables in the model.
If not found in |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
point |
matrix of points where predictions will be computed and returned. |
windows |
vector of bandwidths for the local polynomial smoother, one per explanatory variable. |
epsilon |
convergence criterion. Maximum allowed relative difference between consecutive estimates |
degree |
degree of the local polynomial smoother. Defaults to |
prob |
vector of probabilities of observing each response (length n).
Defaults to |
max.it |
Maximum number of iterations for the algorithm. |
Details
This function computes the standard backfitting algorithm for additive models, using a squared loss function and local polynomial smoothers.
Value
A list with the following components:
alpha |
Estimate for the intercept. |
g.matrix |
Matrix of estimated additive components (n by p). |
prediction |
Matrix of estimated additive components for the points listed in
the argument |
Author(s)
Matias Salibian-Barrera, matias@stat.ubc.ca, Alejandra Martinez
References
Hasie, TJ and Tibshirani, RJ. Generalized Additive Models, 1990. Chapman and Hall, London.
Examples
data(airquality)
tmp <- backf.cl(Ozone ~ Solar.R + Wind + Temp, data=airquality,
subset=complete.cases(airquality), windows=c(130, 9, 10), degree=1)