| anova.tslm | R Documentation |
Produces analysis-of-variance-style tables for 'tslm' objects.
## S3 method for class 'tslm'
anova(object, ..., verbose = FALSE)
object |
a fitted 'tslm' object. |
... |
optional additional fitted model objects for model comparisons. |
verbose |
logical. For AR-error models, use 'TRUE' to return the raw underlying [nlme::anova.gls()] output. |
For ordinary 'tslm()' fits without autoregressive error terms, 'anova()' returns the usual analysis of variance table from [stats::anova.lm()].
For AR-error models fitted through [nlme::gls()], the reported tests are Wald-style tests of model terms. These test whether each term contributes to the fitted mean model after allowing for the estimated autocorrelation structure. Because these models do not use the ordinary independent-error sum-of-squares decomposition, the compact table reports 'Df', 'F value', and 'Pr(>F)', but does not report 'Sum Sq' or 'Mean Sq'. Compare nested AR-error models with care: 'verbose = TRUE' exposes the underlying 'nlme' comparison output rather than recreating an ordinary 'lm' ANOVA table.
Use 'verbose = TRUE' to see the underlying [nlme::anova.gls()] output.
An analysis-of-variance-style table.
data(beer.df)
fit = tslm(beer ~ t + ar(1), data = beer.df, time = t)
anova(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.