Transmission edges, including seeded infections (source = -1).
Arguments
- x
An object of class
epiworld_sir,epiworld_seir, etc. (any model).
Value
The function
get_transmissionsreturns adata.framewith the following columns:date,source,target,virus_id,virus, andsource_exposure_date.
Details
The function get_transmissions includes the seeded infections, with the
source column coded as -1.
Examples
# SEIR Connected model
seirconn <- ModelSEIRCONN(
name = "Disease",
n = 10000,
prevalence = 0.1,
contact_rate = 2.0,
transmission_rate = 0.8,
incubation_days = 7.0,
recovery_rate = 0.3
)
set.seed(937)
run(seirconn, 50)
#> _________________________________________________________________________
#> |Running the model...
#> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| done.
#> |
# Get transmission data
head(get_transmissions(seirconn))
#> date source target virus_id virus source_exposure_date
#> 1 0 -1 6653 0 Disease 0
#> 2 0 -1 9871 0 Disease 0
#> 3 0 -1 6580 0 Disease 0
#> 4 0 -1 7067 0 Disease 0
#> 5 0 -1 1113 0 Disease 0
#> 6 0 -1 1991 0 Disease 0
