Description Usage Arguments Details Author(s) References Examples

Produces an ANODEV table for a set of GAM models, or else a summary for a single GAM model

1 2 3 4 |

`object` |
a fitted Gam |

`...` |
other fitted Gams for |

`test` |
a character string specifying the test statistic to be used. Can be one of '"F"', '"Chisq"' or '"Cp"', with partial matching allowed, or 'NULL' for no test. |

`dispersion` |
a dispersion parameter to be used in computing standard errors |

These are methods for the functions `anova`

or `summary`

for objects inheriting from class ‘Gam’.
See `anova`

for the general behavior of this function
and for the interpretation of ‘test’.

When called with a single ‘Gam’ object, a special pair of anova tables for ‘Gam’ models is returned. This gives a breakdown of the degrees of freedom for all the terms in the model, separating the projection part and nonparametric part of each, and returned as a list of two anova objects. For example, a term specified by ‘s()’ is broken down into a single degree of freedom for its linear component, and the remainder for the nonparametric component. In addition, a type of score test is performed for each of the nonparametric terms. The nonparametric component is set to zero, and the linear part is updated, holding the other nonparametric terms fixed. This is done efficiently and simulataneously for all terms.

Written by Trevor Hastie, following closely the design in the "Generalized Additive Models" chapter (Hastie, 1992) in Chambers and Hastie (1992).

Hastie, T. J. (1992)
*Generalized additive models.*
Chapter 7 of *Statistical Models in S*
eds J. M. Chambers and T. J. Hastie, Wadsworth \& Brooks/Cole.

Hastie, T. and Tibshirani, R. (1990)
*Generalized Additive Models.*
London: Chapman and Hall.

Venables, W. N. and Ripley, B. D. (2002)
*Modern Applied Statistics with S.*
New York: Springer.

1 2 3 4 5 |

```
Loading required package: splines
Loading required package: foreach
Loaded gam 1.14-4
Anova for Nonparametric Effects
Npar Df Npar F Pr(F)
(Intercept)
s(x, 6) 5 28.697 < 2.2e-16 ***
z
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Analysis of Deviance Table
Model 1: y ~ s(x, 6) + z
Model 2: y ~ s(x, 6)
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 92 7.5745
2 93 7.6444 -1 -0.069902 0.3568
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.