Stepwise Model Selection by AIC
twinstim_step.Rd
stepComponent
is a wrapper around step
to select a
"twinstim"
component's model based on an information
criterion in a stepwise algorithm.
There are also stand-alone single-step methods of add1
and
drop1
.
Usage
stepComponent(object, component = c("endemic", "epidemic"),
scope = list(upper = object$formula[[component]]),
direction = "both", trace = 2, verbose = FALSE, ...)
# S3 method for class 'twinstim'
add1(object, scope, component = c("endemic", "epidemic"),
trace = 2, ...)
# S3 method for class 'twinstim'
drop1(object, scope, component = c("endemic", "epidemic"),
trace = 2, ...)
Arguments
- object
an object of class
"twinstim"
.- component
one of
"endemic"
or"epidemic"
(partially matched), determining the model component where the algorithm should proceed.- scope,direction,trace
- verbose
see
twinstim
.- ...
further arguments passed to
step
,add1.default
, ordrop1.default
, respectively.
Author
(of this wrapper around step
) Sebastian Meyer