# NOT RUN {
## load data
data("mers_2014_15")
## estimate the reproduction number (method "parametric_si")
bimonthly_R <- estimate_R(mers_2014_15$incidence[,c("local", "imported")],
method = "parametric_si",
config = make_config(
mean_si = mers_2014_15$si$mean_si,
std_si = mers_2014_15$si$std_si,
t_start = 2:(nrow(mers_2014_15$incidence)-8*7),
t_end = (2:(nrow(mers_2014_15$incidence)-8*7)) + 8*7))
plot(bimonthly_R, legend = FALSE, add_imported_cases = TRUE,
options_I = list(col = c("local" = "black",
"imported" = "red"),
interval = 7, # show weekly incidence
ylab = "Weekly incidence"),
options_R = list(ylab = "Bimonthly R"))
# The first plot shows the weekly incidence,
# with imported cases shown in red and local cases in black
# }
Run the code above in your browser using DataLab