s.wam(x, y, w, s, which, smooth.frame, maxit, tol, trace, se, backchat, ...) lo.wam(x, y, w, s, which, smooth.frame, maxit, tol, trace, se, backchat, ...) all.wam(x, y, w, s, which, smooth.frame, maxit, tol, trace, se, ...)
model.matrix
smooth.frame
gam
, or the component by the same
number returned by any of these functions for subsequent repeated calls.
bf.maxit
set in
gam.control
.
bf.epsilon
set in
gam.control
.
TRUE
, iteration details are printed; default is
FALSE
.
TRUE
(default), standard errors are computed along with the fit.
TRUE
, the fortran code interacts directly with the S-PLUS code in
gam
to test for local-scoring convergence, and obtain an updated
response and weights.
gam
object,
with one additional element called
smooth.frame
(see below).
These functions are not really intended for public use, and are fragile.
In particular, the arguments are not checked for type.
All three functions fit additive models by backfitting, or
iteratively resmoothing partial residuals.
They all use the modified backfitting algorithm of Buja,
Hastie and Tibshirani (1989), described in
Statistical Models in S.This algorithm separates out the parametric, linear part of the
fit from the nonlinear part for each smooth term, and fits all
these linear parts together using the QR algorithm.
If all the smooth terms are specified using
s
, then
s.wam)
is an interface to an efficient Fortran subroutine for performing the fit.
Similarly for
lo
and
lo.wam
.
If the model uses smoothers of both kinds, or others,
all.wam
is used.
The character vector
gam.wlist
lists all the special
.wam
functions currently available, namely
c("s", "lo")
.
The first time the functions are called,
smooth.frame
should
be the model frame produced by the call to
gam
.
The backfitting functions extract the attributes
of all the columns indexed by
which
, which indicates which terms are
smooth terms.
These attributes get processed, and stored back on
smooth.frame
in a condensed form, and returned by the backfitting functions.
On subsequent calls to the backfitter by
gam
, these
processed
smooth.frames
s are used directly.
All the smooth terms in the initial
smooth.frame
have an attribute
call
.
When
all.wam
is used, these are evaluated repeatedly in the backfitting loop.
This makes
all.wam
very general, and allows users to use their own
smoothersin
all.wam
.