Skip to contents

Generate variants of the example model (used to create data for ?DiseasystoreSeirExample)

Usage

generate_example_seir_model(
  module_overrides = list(),
  parameter_overrides = list()
)

Arguments

module_overrides

(named list)
A named list of diseasy modules to override the configuration in the example model.

parameter_overrides

(named list)
A named list of parameters to override the parameters in the example model.

Value

A configured DiseasyModelOdeSeir.

Examples

  model <- generate_example_seir_model()

  model_modified <- generate_example_seir_model(
    parameter_overrides = list("season.scale" = 0.25)
  )

  model_modified$parameters
#> $activity
#> $activity$weights
#> [1] 1 1 1 1
#> 
#> 
#> $compartment_structure
#> E I R 
#> 2 1 2 
#> 
#> $disease_progression_rates
#>         E         I 
#> 0.4761905 0.2222222 
#> 
#> $immunity
#> $immunity$approximate_compartmental_args
#> list()
#> 
#> 
#> $incidence_feature_name
#> [1] "incidence"
#> 
#> $incidence_max_order_derivatives
#> [1] 2
#> 
#> $incidence_polynomial_order
#> [1] 3
#> 
#> $incidence_polynomial_training_length
#> [1] 21
#> 
#> $malthusian_matching
#> [1] TRUE
#> 
#> $model_output_to_observable
#> $model_output_to_observable$incidence
#> $model_output_to_observable$incidence$map
#> function (.x, .y) 
#> {
#>     dplyr::transmute(.x, .data$date, incidence = .data$n_infected/.data$population, 
#>         .data$population)
#> }
#> <environment: 0x5586f7c68a30>
#> 
#> $model_output_to_observable$incidence$reduce
#> ~sum(. * population/sum(population))
#> <environment: 0x5586f7c68a30>
#> 
#> 
#> $model_output_to_observable$n_infected
#> $model_output_to_observable$n_infected$map
#> function (.x, .y) 
#> {
#>     dplyr::transmute(.x, .data$date, .data$n_infected)
#> }
#> <environment: 0x5586f7c68a30>
#> 
#> 
#> 
#> $overall_infection_risk
#> [1] 0.025
#> 
#> $season
#>     peak    scale 
#> 20.09946  0.25000 
#> 
#> $training_length
#>    testing   training validation 
#>          0        Inf          0 
#>