View source: R/recursPredict.R
| recurs_predict | R Documentation |
Modified from the original recursPredict.R (Parag KV, EpiFilter):
the original hardcodes its internal prediction grid to 0:800 and
errors out if any predicted mean incidence exceeds 720. This version
takes the grid's upper bound as a parameter (maxI) instead, so it
doesn't break on larger outbreaks. The Poisson-renewal/quantile
logic is otherwise unchanged from the original.
recurs_predict(Rgrid, pR, Lday, Rmean, a, maxI = 800)
Rgrid |
grid on reproduction numbers |
pR |
posterior over R (filtered or smoothed), from |
Lday |
total infectiousness at each time point |
Rmean |
mean R estimate at each time point |
a |
tail probability defining the reported credible interval |
maxI |
upper bound of the internal prediction grid; set comfortably above the data's peak incidence |
From: Parag KV. (2021) "Improved estimation of time-varying reproduction numbers at low case incidence and between epidemic waves." PLOS Computational Biology 17(9): e1009347. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pcbi.1009347")} https://github.com/kpzoo/EpiFilter
list(pred, predInt): mean one-step-ahead prediction, and a 4 x (n-1) matrix of quantiles (rows: lo95, hi95, lo50, hi50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.