add function to plot trajectories for reff, infection, and cases, with different underpinning prior/posterior values for parameters visible on plot (in title or label or something), for internal diagnostic checks
start with something like this
# prior simulation on reff
sims <- calculate(infections_mod,
reff,
nsim = n_sims)
# crop extreme values and initial noise
ylim <- c(0, 3)
xlim <- c(10, n_days)
plot(sims$reff[1, , ][,1] ~ days,
ylim = ylim,
xlim = xlim,
type = "n",
main = "reff prior")
for (i in seq_len(n_sims)) {
for (j in seq_len(n_states)) {
lines(sims$reff[i, , ][,j] ~ days)
}
}
abline(h = 1, lty = 2)
# prior sim on infections
plot(sims$infections_mod[1, , ][,1] ~ days,
type = "n",
main = "infections prior")
for (i in seq_len(n_sims)) {
for (j in seq_len(n_states)) {
lines(sims$infections_mod[i, , ][,j] ~ days)
}
}
add function to plot trajectories for reff, infection, and cases, with different underpinning prior/posterior values for parameters visible on plot (in title or label or something), for internal diagnostic checks
start with something like this