epi_filter: Bayesian recursive filtering via EpiFilter (internal)

View source: R/epiFilter.R

epi_filterR Documentation

Bayesian recursive filtering via EpiFilter (internal)

Description

Unmodified port of the EpiFilter causal (real-time) filtering algorithm.

Usage

epi_filter(Rgrid, m, eta, pR0, nday, Lday, Iday, a)

Arguments

Rgrid

grid on reproduction numbers

m

size of Rgrid

eta

diffusion (state) noise, controls smoothness of R_t

pR0

prior distribution over Rgrid at t = 1

nday

number of time points

Lday

total infectiousness at each time point (see compute_lambda())

Iday

incidence at each time point

a

tail probability defining the reported credible interval (e.g. 0.025 for a 95% interval)

Details

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

Assumptions: observation model is the Poisson renewal equation (as in EpiEstim); the reproduction number state-space model is a simple diffusion.

Value

list(Rmed, Rhat, Rmean, pR, pRup, pstate): median, 50%/95% quantiles, mean, causal posterior over R, pre-update posterior, and the precomputed state-transition matrix


RtForecastR documentation built on Nov. 25, 2026, 9:09 a.m.