Performs hypothesis tests relating to one or more fitted
gam objects. For a single fitted gam object, Wald tests of
the significance of each parametric and smooth term are performed. Otherwise
the fitted models are compared using an analysis of deviance table. The tests
are usually approximate, unless the models are un-penalized.
Usage
## S3 method for class 'gam':
anova(object, ..., dispersion = NULL, test = NULL)
## S3 method for class 'anova.gam':
print(x, digits = max(3, getOption("digits") - 3),...)
Arguments
object,...
fitted model objects of class gam as produced by gam().
x
an anova.gam object produced by a single model call to anova.gam().
dispersion
a value for the dispersion parameter: not normally used.
test
what sort of test to perform for a multi-model call. One of
"Chisq", "F" or "Cp".
digits
number of digits to use when printing output.
Value
In the multi-model case anova.gam produces output identical to
anova.glm, which it in fact uses.
In the single model case an object of class anova.gam is produced,
which is in fact an object returned from summary.gam.
print.anova.gam simply produces tabulated output.
WARNING
P-values for smooth terms are only approximate.
Details
If more than one fitted model is provided than anova.glm is
used. If only one model is provided then the significance of each model term
is assessed using Wald tests: see summary.gam for details of the
actual computations.
In the latter case print.anova.gam is used as the
printing method. Note that the p-values for smooth terms are approximate only.