A monorepo of renewal-equation epidemic (Rt estimation) modelling examples, exploring different inference approaches and languages: Julia/Turing, the Birch probabilistic programming language, and JAX. Each subproject below is self-contained with its own dependencies and README.
A Julia package of Lux.jl layers/cells for renewal-equation epidemic models:
UnknownGI/FixedGI— generation-interval distribution types (src/gis.jl)RenewalCell— a recurrent renewal-equation cell (src/steps.jl)delay_conv— a causal delay-convolution layer (src/conv.jl)
scripts/ has three runnable Literate.jl-style examples: generation-interval
inference via Turing/NUTS with an AD-backend comparison, a basic RenewalCell simulation,
and a renewal model with observation delay.
An EpiNow2-style Rt renewal model implemented in the Birch
probabilistic programming language, with an epinow_birch() R front-end that slots
Birch's SMC into EpiNow2's own API and plotting. Two inference engines: a self-organizing
random-walk + particle filter, and a proper SMC² (with PMMH rejuvenation) for
static-parameter inference.
A JAX-based exploration of SMC/particle-filter alternatives to NUTS refits of pyrenew-style renewal models: a bootstrap/Liu-West particle filter and an SMC² (with UKF/EKF inner filters), across five model variants (A–E) of increasing structural realism, plus rolling-origin forecasting.
| Package | Purpose |
|---|---|
| CensoredDistributions | interval-censored/truncated distribution utilities for generation-interval construction |
| Distributions | probability distribution types |
| Enzyme | automatic differentiation backend |
| Lux | the neural-network-style layer framework RenewalCell/delay_conv are built on |
| LuxCore | core layer abstractions used by Lux |
| Mooncake | automatic differentiation backend |
| NNlib | neural-network primitives (convolutions) used by delay_conv |
| Random | standard library RNG |
| ReverseDiff | automatic differentiation backend |
| StatsPlots | plotting distributions |
| Turing | probabilistic programming / MCMC (NUTS) for parameter inference |
| Package | Purpose |
|---|---|
| blackjax | sampling library (SMC, MCMC) in JAX |
| cuthbert | Gaussian/Kalman-filtering state-space library, backs the library EKF (ekf_cuthbert) |
| jax | array computing and automatic differentiation |
| matplotlib | plotting |
| numpyro | probabilistic programming in JAX |
| pfjax | particle filtering in JAX |
| properscoring | proper scoring rules (e.g. CRPS) for forecast evaluation |
| pyrenew | reference renewal-equation epi model (CDC), used for infection/feedback dynamics |
| Package | Purpose |
|---|---|
| Birch | probabilistic programming language/compiler providing the SMC/SMC² inference engines (install via brew install lawmurray/all/birch) |
| EpiNow2 | reference Rt estimation package; reused for example data, PMF discretisation, and plotting |
| jsonlite | JSON I/O for passing data between R and Birch |
| ggplot2 | plotting |
| patchwork | combining ggplot2 panels |
| data.table | fast data wrangling |