Generalized Additive Model Object
- DESCRIPTION:
-
Classes of objects that result from fitting generalized additive models.
- GENERATION:
-
This class of objects is returned by the gam function
to represent a fitted generalized additive model.
Class gam inherits from class glm, since the parametric part a
gam.object is fit by weighted least-squares; the object returned has
all the components of a glm.
- METHODS:
-
Objects of this class have methods for the functions print,
plot, summary, anova, predict, fitted, and step, among others.
- STRUCTURE:
-
The following components must be included in a legitimate gam object.
The residuals, fitted values, coefficients and effects should be extracted
by the generic functions of the same name, rather than
by the "$" operator.
The family function returns the entire family object used in the fitting,
and deviance can be used to extract the deviance of the fit.
- coefficients:
-
the coefficients of the parametric part of the additive.predictors,
which multiply the columns of the model matrix.
The names of the coefficients are the names of the
single-degree-of-freedom effects (the columns of the
model matrix).
If the model is overdetermined there will
be missing values in the coefficients corresponding to inestimable
coefficients.
- additive.predictors:
-
the additive fit, given by the product of the model matrix and the
coefficients, plus the columns of the "smooth" component. This fit
will not included offset terms.
- fitted.values:
-
the fitted mean values, obtained by transforming the component
additive.predictors using the inverse link function. Offset terms
will be included in these values.
- smooth:
-
a matrix of smooth terms, with a column corresponding to
each smooth term in the model.
If no smooth terms are in the gam model,
all of these components will be missing.
Each column corresponds to the strictly nonparametric part of the term,
while the parametric part is obtained from the model matrix.
This component is present only when there are smooth terms in the model.
- nl.df:
-
a vector giving the approximate degrees of freedom for each column of
smooth. For smoothing splines specified by s(x),
the approximate df will be the trace of the implicit smoother matrix minus 2.
This component is present only when there are smooth terms in the model.
- nl.chisq:
-
a vector containing a type of score test for the removal
of each of the columns of smooth.
This component is present only when there are smooth terms in the model.
- var:
-
a matrix like smooth, containing the approximate pointwise variances
for the columns of smooth.
This component is present only when there are smooth terms in the model.
- residuals:
-
the residuals from the final weighted additive fit; also known as
working
residuals, these are typically not interpretable without rescaling by
the weights.
- deviance:
-
up to a constant, minus twice the maximized log-likelihood. Similar to
the residual sum of squares.
- null.deviance:
-
the deviance corresponding to the model with no predictors.
- iter:
-
the number of
local scoring
iterations used to compute the estimates.
- family:
-
a three-element character vector giving the name of the family, the
link, and the variance function; mainly for printing purposes.
- weights:
-
the iterative weights from the final IRLS (iteratively reweighted
least-squares) fit. For more information, see the reference below.
The object will also have the components of an lm object:
call, terms and some
others involving the numerical fit. See lm.object.
- REFERENCES:
-
Chambers, J.M., and Hastie, T.J. (1991). Statistical Models in S,
pp. 210-213.
- SEE ALSO:
-
gam
,
glm.object
,
lm.object
.