Skip to contents

Run a single instance of the branching process model for post-exposure prophylaxis for high-risk contacts. See Details for a full description of branching process model.

Usage

outbreak_model(
  prop_pep,
  rel_risk,
  hrc_mu,
  hrc_disp,
  lrc_mu,
  lrc_disp,
  p_hrc_case,
  p_lrc_case,
  n_initialcases,
  cap_max_gen,
  cap_max_cases
)

Arguments

prop_pep

Proportion of high-risk contacts that receive PEP

rel_risk

Relative risk of a high-risk contact becoming a case after receiving PEP

hrc_mu

Average number of high-risk contacts

hrc_disp

Dispersion parameter for number of high-risk contacts

lrc_mu

Average number of low-risk contacts

lrc_disp

Dispersion parameter for number of low-risk contacts

p_hrc_case

Probability that a high-risk contact becomes a case

p_lrc_case

Probability that a low-risk contact becomes a case

n_initialcases

Integer number of initial cases

cap_max_gen

Stop the simulation when this many generations is reached

cap_max_cases

Stop the simulation when this many cases is reached

Value

A data.frame of cases by generation, with columns:

  • generation

  • case_id

  • case_type: one of "PEP", "HRC" (no PEP), "LRC".

  • infector: case_id of infector (currently not used)

  • new_cases: total new cases

  • new_cases_hrc: new cases that were high-risk contacts

  • new_cases_pep: new cases that were high-risk contacts that received PEP

  • new_cases_lrc: new cases that were low-risk contacts

  • n_hrc: number of high-risk contacts that did not receive PEP

  • n_pep: number of high-risk contacts that received PEP

  • n_lrc: number of low-risk contacts

Details

The outbreak begins with a given number of initial cases. Each case has some number of high- and low-risk contacts, each defined by a negative binomial distribution. A fixed proportion prop_pep of high-risk contacts receive PEP. High-risk contacts who do not receive PEP become cases with probability p_hrc_case; high-risk contacts who receive PEP become cases with lower probability p_hrc_case*rel_risk. Low-risk contacts do not receive PEP, and become cases with probability p_lrc_case.

Author

Sophie Meakin, Joel Hellewell