View source: R/generate_stratified_model.R
generate_stratified_model | R Documentation |
The model needs to adhere to the structure specified by the modelbuilder package. Models built using the modelbuilder package automatically have the right structure. A user can also build a model list structure themselves following the modelbuilder specifications. If the user provides a file name, this file needs to be an RDS file and contain a valid modelbuilder model structure.
generate_stratified_model(mbmodel, stratum_list, par_stratify_list)
mbmodel |
modelbuilder model structure, either as list object or file name |
stratum_list |
A list of lists defining the stratification structure
to be applied to the model. At a minimum, the list must contain one
sublist with the following structure: |
par_stratify_list |
A list that defines the stratification of
parameters in reference to state variables. This list can be auto
generated by calling the modelbuilder |
This function takes as input a modelbuilder model and expands it according to specified stratifications (e.g. age groups).
The function returns a modelbuilder model object (a list).
Andrew Tredennick and Andreas Handel
## Not run:
mbmodel <- readRDS("auxiliary/modelfiles/Coronavirus_vaccine_model_v2.Rds")
strata_list <- list(
stratumname = "risk",
names = c("high risk", "low risk"),
labels = c("h", "l"),
comment = "This defines the risk structure."
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.