makeControl {surveillance} | R Documentation |
Generate control
Settings for an hhh4
Model
Description
Generate control
Settings for an hhh4
Model
Usage
makeControl(f = list(~1), S = list(0, 0, 1), period = 52, offset = 1, ...)
Arguments
f , S , period |
arguments for |
offset |
multiplicative component offsets in the order ( |
... |
further elements for the |
Value
a list for use as the control
argument in hhh4
.
Examples
makeControl()
## a simplistic model for the fluBYBW data
## (first-order transmission only, no district-specific intercepts)
data("fluBYBW")
mycontrol <- makeControl(
f = list(~1, ~1, ~t), S = c(1, 1, 3),
offset = list(population(fluBYBW)), # recycled -> in all components
ne = list(normalize = TRUE),
verbose = TRUE)
str(mycontrol)
## fit this model
fit <- hhh4(fluBYBW, mycontrol)
[Package surveillance version 1.23.0 Index]