Get parameters for generalized Ross-Macdonald mosquito model
Source:R/mosquito_RM.R
get_config_mosquito_RM.Rd
The JSON config file should have 8 entries:
stochastic: a boolean value
f: scalar
q: scalar
eip: scalar or vector; see time_varying_parameter for valid formats
p: scalar or vector; see time_varying_parameter for valid formats
psi: matrix
nu: scalar
M: vector
Y: vector
Z: vector
For interpretation of the entries, please read setup_mosquito_RM.
Value
a named list
Examples
# to see an example of proper JSON input, run the following
library(jsonlite)
t <- 10 # days to simulate
p <- 5 # number of patches
EIP <- rep(5, t)
p_surv <- 0.95
psi <- matrix(rexp(p^2), nrow = p, ncol = p)
psi <- psi / rowSums(psi)
par <- list(
"stochastic" = FALSE,
"f" = 0.3,
"q" = 0.9,
"eip" = EIP,
"p" = p_surv,
"psi" = psi,
"nu" = 20,
"M" = rep(100, p),
"Y" = rep(20, p),
"Z" = rep(5, p)
)
toJSON(par, pretty = TRUE)
#> {
#> "stochastic": [false],
#> "f": [0.3],
#> "q": [0.9],
#> "eip": [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
#> "p": [0.95],
#> "psi": [
#> [0.0109, 0.4982, 0.3906, 0.0685, 0.0318],
#> [0.1154, 0.0884, 0.1007, 0.5189, 0.1766],
#> [0.3346, 0.1042, 0.1548, 0.1108, 0.2957],
#> [0.2731, 0.0114, 0.0447, 0.5172, 0.1536],
#> [0.4365, 0.0609, 0.107, 0.1918, 0.2038]
#> ],
#> "nu": [20],
#> "M": [100, 100, 100, 100, 100],
#> "Y": [20, 20, 20, 20, 20],
#> "Z": [5, 5, 5, 5, 5]
#> }