Construct model
Value
a list containing the data, the model parameters, and pathogen names of class `EpiStrainDynamics.model`
Examples
# Basic usage
method_obj <- random_walk()
pathogen_obj <- single(
case_timeseries = sarscov2$cases,
time = sarscov2$date,
pathogen_name = "SARS-CoV-2"
)
mod <- construct_model(
method = method_obj,
pathogen_structure = pathogen_obj,
dow_effect = TRUE
)
# Alternatively, call the methods and pathogen structure inside the function
mod <- construct_model(
method = p_spline(),
pathogen_structure = multiple(
case_timeseries = sarscov2$cases,
time = sarscov2$date,
component_pathogen_timeseries = list(
alpha = sarscov2$alpha,
delta = sarscov2$delta,
omicron = sarscov2$omicron,
other = sarscov2$other)),
dow_effect = FALSE
)