ANOVA Table for a GAM Object

DESCRIPTION:

This is a method for the function anova for objects inheriting from class gam. See anova for the general behavior of this function and for the interpretation of the aguments.

USAGE:

anova.gam(object, ..., test) 

DETAILS:

When called with a single gam object, a special anova table 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. 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 simultaneously for all terms.

REFERENCES:

Chambers, J.M., and Hastie, T.J. (1991). Statistical Models in S, pp. 210-213, 273.

SEE ALSO:

, , .

EXAMPLES:

# create a sample gam object 
gam.object <- gam(Kyphosis ~ lo(Number) + lo(Start, degree = 2),  
                  data = kyphosis) 
anova(gam.object) 
# produces the following output: 
DF for Terms and F-values for Nonparametric Effects 
                      Df Npar Df     Npar F     Pr(F)  
          (Intercept)  1                      
           lo(Number)  1     2.8   0.870022 0.4540488 
lo(Start, degree = 2)  2     4.0   1.838448 0.1309525