backf.cl.RdThis function computes the standard backfitting algorithm for additive models.
backf.cl( formula, data, subset, point = NULL, windows, epsilon = 1e-06, degree = 0, prob = NULL, max.it = 100 )
| 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. |
A list with the following components:
Estimate for the intercept.
Matrix of estimated additive components (n by p).
Matrix of estimated additive components for the points listed in
the argument point.
This function computes the standard backfitting algorithm for additive models, using a squared loss function and local polynomial smoothers.
Hasie, TJ and Tibshirani, RJ. Generalized Additive Models, 1990. Chapman and Hall, London.
Matias Salibian-Barrera, matias@stat.ubc.ca, Alejandra Martinez
data(airquality) tmp <- backf.cl(Ozone ~ Solar.R + Wind + Temp, data=airquality, subset=complete.cases(airquality), windows=c(130, 9, 10), degree=1)