Create agents and initialize with properties.

build_agent_df(
  age,
  sex,
  med_cond,
  seir_status,
  transmission_params,
  progression_params,
  sympt = NULL,
  ticks = NULL
)

Arguments

age

Age in years.

sex

Sex: "M" or "F" or a factor with levels "M" and "F".

med_cond

Logical: has a pre-existing medical condition

seir_status

SEIR status: "S", "E", "I", "R", or an ordered factor with those levels.

transmission_params

A data frame with transmission parameters for agents

progression_params

A data frame with parameters for the timing of disease progression (from "E" to "I" and "I" to "R")

sympt

Subject will be symptomatic if they are infected (logical).

ticks

For exposed or infected agents: Number of ticks since they entered that state.

Value

A data.table of agent characteristics with columns

  • age: Age in years (numeric).

  • age_bkt: The age bracket (ordered factor).

  • sex: The sex (factor with levels "M" and "F").

  • med_cond: Has a medical condition (logical).

  • sympt: Has symptoms of COVID-19, if infectious (logical).

  • seir: SEIR status (ordered factor with levels "S", "E", "I", and "R").

  • id: Unique ID number (integer)

  • ticks: days since reaching current disease stage (relevant to "E" and "I" status only) (integer).

  • target: target ticks for transition to next compartment (relevant to "E" and "I" status only).

  • x_shed: Shedding parameter (relevant to "I" status only)

  • x_susc: Susceptibility parameter (relevant to "S" status only)

  • shape_ei: Shape parameter for progression from "E" to "I" compartment.

  • scale_ei: Scale parameter for progression from "E" to "I" compartment.

  • shape_ir: Shape parameter for progression from "I" to "R" compartment.

  • scale_ir: Scale parameter for progression from "I" to "R" compartment.

Examples

# ADD_EXAMPLES_HERE