Gets the value of one or more object in the parameters
or the
extra information list extra_info
.
Value
A named list with two elements, 'parameters' and 'extra_info', which
are themselves lists. Each of these lists has named elements corresponding to
the names passed in which
. These are separated into two lists to make it
easier to identify whether they are model function arguments or extra
information for the scenario.
Examples
# create a scenario
scenario_pandemic_flu <- scenario(
model_function = "finalsize::final_size",
parameters = make_parameters_finalsize_UK(),
replicates = 1
)
# get all parameters
sce_get_information(scenario_pandemic_flu)
#> $model_parameters
#> $model_parameters$r0
#> [1] 1.5
#>
#> $model_parameters$contact_matrix
#>
#> contact.age.group [,1] [,2] [,3]
#> [0,20) 4.514575e-08 1.600071e-08 8.965770e-09
#> [20,40) 1.600071e-08 2.489595e-08 1.346051e-08
#> 40+ 8.965770e-09 1.346051e-08 1.464763e-08
#>
#> $model_parameters$demography_vector
#> [1] 14799290 16526302 28961159
#>
#> $model_parameters$p_susceptibility
#> [,1]
#> [1,] 1
#> [2,] 1
#> [3,] 1
#>
#> $model_parameters$susceptibility
#> [,1]
#> [1,] 1
#> [2,] 1
#> [3,] 1
#>
#> $model_parameters$solver
#> [1] "newton"
#>
#>
#> $scenario_information
#> list()
#>
# get only some parameters
sce_get_information(scenario_pandemic_flu, which = c("r0", "solver"))
#> $r0
#> [1] 1.5
#>
#> $solver
#> [1] "newton"
#>