Calibrate a mixing model to a target reproduction number
Source:R/calibrate_mixing_model.R
calibrate_mixing_model.RdUses 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().
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.4608991
# 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