Masking intervention (non-pharmaceutical intervention)
npi_add_masking(model, preval, transmission_reduction)
Returns an object of class epiworld_model, where model is substituted with the model name.
Other interventions:
interventions_add_all()
,
npi_add_school_closure()
,
pi_add_vaccine()
library(epiworldR) # for ModelSEIRCONN function
model <- ModelSEIRCONN("COVID-19", n = 1000, prevalence = 0.05,
contact_rate = 4, transmission_rate = 0.1,
incubation_days = 7, recovery_rate = 0.14)
run(model, ndays = 100, seed = 123)
#> _________________________________________________________________________
#> Running the model...
#> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| done.
#> done.
npi_add_masking(model, preval = .8, transmission_reduction = .7)
#> Warning: Starting version 0.3-0, the 'prevalence' argument is required. It will be set to be 0.5. Next versions will fail with an error.
#> Warning: The 'proportion' argument is deprecated. Use 'set_distribution_tool' instead.