historical_vaccinate_prob#
- class historical_vaccinate_prob(vaccine, days, label=None, prob=1.0, subtarget=None, compliance=1.0, **kwargs)[source]#
Bases:
BaseVaccination
Probability-based historical vaccination
This vaccine intervention allocates vaccines parametrized by the daily probability of being vaccinated. Unlike cv.vaccinate_prob this function allows vaccination prior to t=0 (and continuing into the simulation).
If any people are infected at the t=0 timestep (e.g. seed infections), this finds those people and will re-infect them at the end of the historical vaccination. Thus you may have breakthrough infections and this might affect other interventions to initialize a population.
- Parameters:
vaccine (dict/str) – which vaccine to use; see below for dict parameters
label (str) – if vaccine is supplied as a dict, the name of the vaccine
days (int/arr) – the day or array of days to apply the interventions
prob (float) – probability of being vaccinated (i.e., fraction of the population)
subtarget (dict) – subtarget intervention to people with particular indices (see test_num() for details)
compliance (float/arr) – compliance of the person to take each dose (if scalar then applied per dose)
kwargs (dict) – passed to Intervention()
If
vaccine
is supplied as a dictionary, it must have the following parameters:nab_eff
: the waning efficacy of neutralizing antibodies at preventing infectionnab_init
: the initial antibody level (higher = more protection)nab_boost
: how much of a boost being vaccinated on top of a previous dose or natural infection providesdoses
: the number of doses required to be fully vaccinatedinterval
: the interval between dosesentries for efficacy against each of the strains (e.g.
b117
)
See
parameters.py
for additional examples of these parameters.Example:
pfizer = cv.historical_vaccinate_prob(vaccine='pfizer', days=np.arange(-30,0), prob=0.007) # 30-day vaccination campaign cv.Sim(interventions=pfizer).run().plot()
New in version 3.1.0.
Methods
- static process_days(sim, days, return_dates=False)[source]#
Ensure lists of days are in consistent format. Used by change_beta, clip_edges, and some analyzers. Optionally return dates as well as days. If days is callable, leave unchanged.
- static estimate_prob(duration, coverage)[source]#
Estimate the per-day probability to achieve desired population coverage for a campaign of fixed duration and fixed per-day probability of a person being vaccinated
- Parameters:
duration – length of campign in days
coverage – target coverage of campaign
Example:
prob = historical_vaccinate.estimate_prob(duration=180, coverage=0.70)