Usage
addterm(object, ...)## S3 method for class 'default':
addterm(object, scope, scale = 0, test = c("none", "Chisq"),
k = 2, sorted = FALSE, trace = FALSE, ...)
## S3 method for class 'lm':
addterm(object, scope, scale = 0, test = c("none", "Chisq", "F"),
k = 2, sorted = FALSE, ...)
## S3 method for class 'glm':
addterm(object, scope, scale = 0, test = c("none", "Chisq", "F"),
k = 2, sorted = FALSE, trace = FALSE, ...)
Arguments
object
An object fitted by some model-fitting function.
scope
a formula specifying a maximal model which should include the current
one. All additional terms in the maximal model with all marginal terms
in the original model are tried.
scale
used in the definition of the AIC statistic for selecting the models,
currently only for lm
, aov
and glm
models. Specifying scale
asserts that the residual standard error or dispersion is known.
test
should the results include a test statistic relative to the original
model? The F test is only appropriate for lm
and aov
models,
and perhaps for some over-dispersed glm
models. The
Chisq test can be an exact test (
k
the multiple of the number of degrees of freedom used for the penalty.
Only k=2
gives the genuine AIC: k = log(n)
is sometimes referred
to as BIC or SBC.
sorted
should the results be sorted on the value of AIC?
trace
if TRUE
additional information may be given on the fits as they are tried.
...
arguments passed to or from other methods.