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 |
The function returns a modelbuilder model object (a list).
This function takes as input a modelbuilder model and expands it according to specified stratifications (e.g. age groups).
Andrew Tredennick and Andreas Handel