Learn R Programming

MicroMoB (version 0.1.2)

get_config_humans_SIS: Get parameters for SIS human model

Description

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)

Value

a named list

Arguments

path

a file path to a JSON file

Examples

Run this code
# 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)

Run the code above in your browser using DataLab