Skip to contents

Uses the epiworldR::compute_reproduction_number() function to optimize the scaling factor of the contact matrix to match a target reproduction number.

Usage

calibrate_mixing_model(
  contact_matrix,
  target_rep_number,
  infectious_period_days,
  transmission_prob,
  ...
)

Arguments

contact_matrix

A contact matrix to be calibrated.

target_rep_number

The target reproduction number to calibrate to.

infectious_period_days

The average number of days an individual is infectious.

transmission_prob

The probability of transmission per contact.

...

Additional arguments to pass to stats::optimize().

Value

The scaling factor for the contact matrix that achieves the target reproduction number.

Details

In the case of the ModelMeaslesMixing(), if agents with rash are assumed to not be fully isolated, the calibration process needs to incorporate this information into the function. In practice, this means that the infectious period should include the days with rash, scaled by (1 - rash_reduction_contact_rate). For instance, if the prodromal period is 4 days, the rash period is 3 days, and the rash_reduction_contact_rate is 0.8, the effective infectious period would be 4 + 3 * (1 - 0.8) = 4.6 days.

Examples

data(short_creek_matrix, package = "measles")

# Calibrating for a measles model with R0 of 10
# assuming agents are infectious during prodomal stage
# (isolated during rash stage)
calibrate_mixing_model(
  contact_matrix = short_creek_matrix,
  target_rep_number = 10,
  infectious_period_days = 4,
  transmission_prob = 0.2
)
#> [1] 0.4853377

# You can then use the scaling factor in a mixing
# model. Instead of using the original contact matrix,
# you would use:
#   contact_matrix * scaling_factor