R/aux_functions.R
extinct_prob.Rd
Calculate proportion of runs that have controlled outbreak
extinct_prob(outbreak_df_week = NULL, cap_cases = NULL, week_range = 12:16)
a data.table
: weekly cases produced by the
outbreak model
a positive integer
scalar: number of cumulative cases at
which the branching process (simulation) was terminated
a positive integer
vector: giving the (zero indexed)
week range to test for whether an extinction occurred.
a single numeric
with the probability of extinction
res <- scenario_sim(
n.sim = 10,
num.initial.cases = 1,
prop.asym = 0,
prop.ascertain = 0.2,
cap_cases = 4500,
cap_max_days = 350,
r0isolated = 0.5,
r0community = 2.5,
disp.com = 0.16,
disp.iso = 1,
delay_shape = 1.65,
delay_scale = 4.28,
k = 0,
quarantine = FALSE
)
extinct_prob(res, cap_cases = 4500)
#> [1] 0.4