Set up initial cases for branching process
outbreak_setup(num.initial.cases, incfn, delayfn, k, prop.asym)
a nonnegative integer
scalar: number of initial
or starting cases which are all assumed to be missed.
a function
that samples from incubation period Weibull
distribution; generated using dist_setup()
a function
that samples from the onset-to-hospitalisation
delay Weibull distribution; generated using dist_setup()
a numeric
scalar: skew parameter for sampling the serial
interval from the incubation period
a nonnegative numeric
scalar: proportion of cases that
are completely asymptomatic (sublinical) (between 0 and 1)
data.table
of cases in outbreak so far. data.table
columns are:
$exposure
: numeric
$asym
: logical
$caseid
: integer
$infector
: numeric
$missed
: logical
$onset
: numeric
$new_cases
: logical
$isolated_time
: numeric
$isolated
: logical
# incubation period sampling function
incfn <- dist_setup(dist_shape = 2.32, dist_scale = 6.49)
# delay distribution sampling function
delayfn <- dist_setup(dist_shape = 1.65, dist_scale = 4.28)
out <- outbreak_setup(
num.initial.cases = 1,
incfn = incfn,
delayfn = delayfn,
k = 1.95,
prop.asym = 0
)
out
#> exposure asym caseid infector missed onset new_cases isolated_time
#> <num> <lgcl> <int> <num> <lgcl> <num> <lgcl> <num>
#> 1: 0 FALSE 1 0 TRUE 8.118098 NA 9.679915
#> isolated
#> <lgcl>
#> 1: FALSE