Anova Method for Loess Objects

DESCRIPTION:
This function takes a loess object, that is, a fitted local regression model returned by the loess function, and produces an Analysis of Variance Table.

USAGE:
anova.loess(object, ... , test = "F")
object:
a loess object
...:
loess objects.
test:
the test method. Three are available: "F", "none", and "Cp".

VALUE:
an object of class "anova".

If just one object is given, the model is summarized. For two or more objects the result depends on the test. For "F", F tests are carried out; object k is tested against object k-1 with the scale estimate from the object with the largest value of enp. For "Cp", Mallows' statistic is computed with the scale estimate from the object with the largest value of enp. For "none", no test is carried out.


DETAILS:
This function is a method for the generic function anova for class "loess". It can be invoked by calling anova for an object of the appropriate class, or directly by calling anova.loess regardless of the class of the object.

REFERENCES:
Chambers, J.M., and Hastie, T.J. (1991). Statistical Models in S, 210-213, 330.

SEE ALSO:
anova , loess , loess.control , plot.loess , predict.loess, preplot.loess , pointwise , specs.control .

EXAMPLES:
attach(ethanol)
# create sample objects
gas.m <- loess(formula = NOx ~ E, span = 1, data = gas)
gas.m.null <- loess(formula = NOx ~ E, span = 2/3, data = gas)

anova(gas.m.null, gas.m)

# produces the following output: Model 1: loess(formula = NOx ~ E, data = gas, span = 1) Model 2: loess(formula = NOx ~ E, data = gas, span = 2/3) Analysis of Variance Table ENP RSS Test F Value Pr(F) 1 3.5 4.8489 1 vs 2 10.14 0.0008601 2 5.5 1.7769