# NOT RUN {
## load data on pandemic flu in a school in 2009
data("Flu2009")
## estimate the case reproduction number (method "non_parametric_si")
res <- wallinga_teunis(Flu2009$incidence,
method="non_parametric_si",
config = list(t_start = seq(2, 26), t_end = seq(8, 32),
si_distr = Flu2009$si_distr,
n_sim = 100))
plot(res)
## the second plot produced shows, at each each day,
## the estimate of the case reproduction number over the 7-day window
## finishing on that day.
## estimate the case reproduction number (method "parametric_si")
res <- wallinga_teunis(Flu2009$incidence, method="parametric_si",
config = list(t_start = seq(2, 26), t_end = seq(8, 32),
mean_si = 2.6, std_si = 1.5,
n_sim = 100))
plot(res)
## the second plot produced shows, at each each day,
## the estimate of the case reproduction number over the 7-day window
## finishing on that day.
# }
Run the code above in your browser using DataLab