setup_sim: Set-up simulation

Description Usage Arguments Value

View source: R/setup.R

Description

setup_sim takes inputs and generates all needed outputs to be passed to simrabid.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
setup_sim(
  start_date = "2002-01-01",
  apprx_end_date = "2020-01-01",
  days_in_step = 7,
  rast,
  death_rate_annual,
  birth_rate_annual,
  waning_rate_annual,
  block_fun = block_cells,
  params = list(start_pop),
  by_admin = FALSE
)

Arguments

start_date

date, the starting date for the simulation in year-month-day format

apprx_end_date

date, the approximate end date for the simulation in year-month-day format, the set-up fun will return the actual end date of the simulation rounded up to the maximum number of timesteps in the interval based on days_in_step

days_in_step

the number of days to aggregate timesteps by, defaults to 7 ("weekly"), but can be arbitrary number of days

rast

raster, from setup_space the output raster with each cell allocated to a location

death_rate_annual

annual death rate, either length 1 or length of the admin units

birth_rate_annual

annual birth rate, either length 1 or length of the admin units

waning_rate_annual

annual waning rate of vaccination immunity, either length 1 or length of the admin units

block_fun

a function that designates the indices to track/block/consider out-of-bounds (see block_cells for an example)

params

additional params to pass, must include start_pop, a numeric vector of the starting population in each grid cell of rast

by_admin

logical, should mixing be at the admin (or arbitrary) scale?

Value

a list of objects needed for the simulation


mrajeev08/simrabid documentation built on May 7, 2021, 11:47 a.m.