loess object, that is, a fitted local
regression model returned by the
loess function, and produces an
Analysis of Variance Table.
anova.loess(object, ... , test = "F")
"F",
"none", and
"Cp".
"anova".
"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.
This function is a method for the generic function for class loess. It can be invoked by calling for an object x of the appropriate class, or directly by calling regardless of the class of the object.
Chambers, J.M., and Hastie, T.J. (1991). Statistical Models in S, 210-213, 330.
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