get_config_humans_MOI: Get parameters for MOI human model

View source: R/humans_MOI.R

get_config_humans_MOIR Documentation

Get parameters for MOI human model

Description

The JSON config file should have 9 entries:

  • stochastic: a boolean value

  • theta: matrix (row major)

  • wf: vector

  • H: vector

  • MOI: matrix (row major)

  • b: scalar

  • c: scalar

  • r: scalar

  • sigma: scalar

For interpretation of the entries, please read setup_humans_MOI.

Usage

get_config_humans_MOI(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)
MOI <- matrix(0, nrow = 10, ncol = n)
MOI[1, ] <- H
par <- list(
 "stochastic" = FALSE,
 "theta" = theta,
 "wf" = rep(1, n),
 "H" = H,
 "MOI" = MOI,
 "b" = 0.55,
 "c" = 0.15,
 "r" = 1/200,
 "sigma" = 1
)
toJSON(par, pretty = TRUE)

MicroMoB documentation built on Jan. 17, 2023, 9:06 a.m.