Anova tables for fitted trend surface objects
anova.trls.RdCompute analysis of variance tables for one or more
fitted trend surface model objects; where anova.trls is
called with multiple objects, it passes on the arguments to
anovalist.trls.
Usage
# S3 method for class 'trls'
anova(object, ...)
anovalist.trls(object, ...)References
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
Examples
library(stats)
data(topo, package="MASS")
topo0 <- surf.ls(0, topo)
topo1 <- surf.ls(1, topo)
topo2 <- surf.ls(2, topo)
topo3 <- surf.ls(3, topo)
topo4 <- surf.ls(4, topo)
anova(topo0, topo1, topo2, topo3, topo4)
#> Analysis of Variance Table
#>
#> Model 1: surf.ls(np = 0, x = topo)
#> Model 2: surf.ls(np = 1, x = topo)
#> Model 3: surf.ls(np = 2, x = topo)
#> Model 4: surf.ls(np = 3, x = topo)
#> Model 5: surf.ls(np = 4, x = topo)
#> Res.Df Res.Sum Sq Df Sum Sq F value Pr(>F)
#> 1 51 196030
#> 2 49 67186 2 128844 46.9843 4.040e-12
#> 3 46 39958 3 27228 10.4482 2.325e-05
#> 4 42 21577 4 18381 8.9447 2.558e-05
#> 5 37 14886 5 6691 3.3265 0.014
summary(topo4)
#> Analysis of Variance Table
#> Model: surf.ls(np = 4, x = topo)
#> Sum Sq Df Mean Sq F value Pr(>F)
#> Regression 181144.0 14 12938.8567 32.16092 2.2204e-16
#> Deviation 14885.7 37 402.3162
#> Total 196029.7 51
#> Multiple R-Squared: 0.9241, Adjusted R-squared: 0.8953
#> AIC: (df = 15) 324.1594
#> Fitted:
#> Min 1Q Median 3Q Max
#> 702.1 785.0 836.3 880.5 939.1
#> Residuals:
#> Min 1Q Median 3Q Max
#> -34.077 -12.568 -2.085 14.056 50.161