Agent state update function of an agent-based model
F(X_i(t), N_i(t), E(t), A(t), U_i(t)) = X_i(t+1)
Maps the state of agent i at step t, the set of agents in contact with it, the state of the environment, the intervention in force and a random input to the state of that agent at step t+1, the rule X_i(t+1) = F(X_i(t), N_i(t), E(t), A(t), U_i(t)) of the article. In an infection model the rule for a susceptible agent reduces to a per-step infection probability from its k infectious contacts, the complement of the binomial probability of no events (HE-FM-BINOM-002), followed by a comparison of the agent's own uniform random number with that probability. A per-contact probability built from a transmission rate uses the constant-rate conversion HE-FM-TP-001, and a probability observed over another interval is rescaled with HE-FM-TP-003; neither is restated here. Population outputs are averaged over independent runs, and the Monte Carlo standard error of such a mean is the standard deviation across runs divided by the square root of the number of runs, the form of HE-FM-ANTV-002 with one observation per run and the divisor of HE-FM-BSE-001. This package adds the number of runs needed for a target standard error of a mean and of a share of runs. Attack rates and the final size relation are in HE-FN-ATR-001 and HE-CF-ATR-001, the cohort simulation without interaction is HE-FN-CSIM-001, and expected onward infections and the reproduction number belong to the Basic Reproduction Number page. Notation follows the Agent-Based Model article.
Per-step infection probability of a susceptible agent from k infectious contacts
P_inf = 1 - (1 - p)^k
One-step infection update of a susceptible agent from its own uniform random number
P_inf = 1 - (1 - p)^k; X_next = (U < P_inf)
Monte Carlo runs needed for a target standard error of a mean agent-based model outcome
R_req = (s_run / e_target)^2
Monte Carlo runs needed for a target standard error of a share of agent-based model runs
R_prop = P_exp * (1 - P_exp) / e_share^2
