initialize_agent_array: Initialize array for agent simulations

Description Usage Arguments Value

View source: R/simulate-agents.R

Description

Initialize array for agent simulations

Usage

1
2
3
4
5
6
7
initialize_agent_array(
  init_vals,
  max_T,
  n_sims,
  birth_dates = NULL,
  birth_states = NULL
)

Arguments

init_vals

vector of length K corresponding to the initial values in each state. This will be over-ridden by birth_dates and birth_states if those are not NULL.

max_T

total number of discrete time steps

n_sims

number of simulations to run

birth_dates

vector of size N, the maximum number of agents where each entry is the 'birth' of the agent into the system

birth_states

which state an agent begins when born into the system

Value

n_sims x n_agents x (max_T + 1) array where entry ijt is the state of agent j in simulation i at time t-1. The states they can take are integers between -1 (not born yet) and K-1 where 0 to K-1 correspond to different states.


skgallagher/EpiCompare documentation built on Sept. 14, 2021, 5:45 a.m.