Skip to contents

The JSON config file should have 8 entries:

  • stochastic: a boolean value

  • theta: matrix (row major)

  • wf: vector

  • H: vector

  • X: vector

  • b: scalar

  • c: scalar

  • r: scalar

For interpretation of the entries, please read setup_humans_SIS.

Usage

get_config_humans_SIS(path)

Arguments

path

a file path to a JSON file

Value

a named list

Examples

# to see an example of proper JSON input, run the following
library(jsonlite)
n <- 6 # number of human population strata
p <- 5 # number of patches
theta <- matrix(rexp(n*p), nrow = n, ncol = p)
theta <- theta / rowSums(theta)
H <- rep(10, n)
X <- rep(3, n)
par <- list(
 "stochastic" = FALSE,
 "theta" = theta,
 "wf" = rep(1, n),
 "H" = H,
 "X" = X,
 "b" = 0.55,
 "c" = 0.15,
 "r" = 1/200
)
toJSON(par, pretty = TRUE)
#> {
#>   "stochastic": [false],
#>   "theta": [
#>     [0.0294, 0.079, 0.1148, 0.4449, 0.3319],
#>     [0.0247, 0.4245, 0.2016, 0.1355, 0.2137],
#>     [0.1686, 0.1426, 0.0344, 0.4107, 0.2437],
#>     [0.1251, 0.3666, 0.1307, 0.0872, 0.2904],
#>     [0.157, 0.116, 0.6738, 0.0076, 0.0456],
#>     [0.0128, 0.0691, 0.0106, 0.5096, 0.3979]
#>   ],
#>   "wf": [1, 1, 1, 1, 1, 1],
#>   "H": [10, 10, 10, 10, 10, 10],
#>   "X": [3, 3, 3, 3, 3, 3],
#>   "b": [0.55],
#>   "c": [0.15],
#>   "r": [0.005]
#> }