Skip to contents

Compartmental models under the Gaussian approximation

Any mass-action compartmental model, incidence or prevalence observations, time-varying rates.

ga_model()
Define a mass-action compartmental model
ga_event()
Define an event of a mass-action compartmental model
ga_incidence() ga_prevalence()
Observation streams for the Gaussian-approximation likelihood
ga_loglik()
Gaussian-approximation log-likelihood of a compartmental model
ga_simulate()
Exact simulation of a compartmental model and its surveillance counts
ga_fit()
Maximum likelihood for a compartmental model under the Gaussian approximation
ga_profile()
Profile log-likelihood for one parameter of a ga_fit
ga_bootstrap()
Parametric bootstrap for a ga_fit
confint(<ga_fit>)
Wald confidence intervals for a ga_fit
confint(<ga_boot>)
Bootstrap confidence intervals for a ga_boot
predict(<ga_fit>)
One-step-ahead predictions from a ga_fit
plot(<ga_fit>)
Plot the one-step-ahead predictions of a ga_fit

SIRD-GA from daily cases and deaths

sird_ga_simulate_inc()
Simulate daily reported cases and deaths from the SIRD jump process
sird_ga_loglik_inc()
SIRD-GA log-likelihood for daily reported cases and/or deaths
sird_ga_fit_inc()
Maximum likelihood for SIRD-GA from daily cases and/or deaths
sird_ga_fit_tv()
SIRD-GA with piecewise-constant transmission, fitted to cases and deaths
sird_ga_profile()
Profile log-likelihood of one SIRD-GA parameter
sird_ga_loglik_prev()
Fast Kalman log-likelihood for prevalence observations

SIRD-GA: dynamics, simulation and the prevalence model

sird_drift()
Deterministic SIRD drift vector
sird_jacobian()
Jacobian of the SIRD drift vector
sird_diffusion()
Diffusion covariance matrix of the SIRD jump process
sird_sigma()
Diffusion "square-root" factor of the SIRD jump process
sird_R0()
Basic reproduction number of the SIRD model
sird_ode_solve()
Solve the deterministic normalised SIRD ODE system
sird_gillespie()
Exact stochastic simulation of the SIRD jump process (Gillespie algorithm)
sird_ga_simulate_obs()
Simulate partially-observed SIRD-GA surveillance data
sird_ga_transition()
Solve the SIRD-GA state-space transition quantities
sird_ga_Ak()
Resolvent matrix \(A_{k-1} = \Phi(t_k, t_{k-1})\) of interval k
sird_ga_Fk()
Drift increment \(F_k\) of interval k
sird_ga_Qk()
State-noise covariance \(Q_k\) of interval k
sird_ga_loglik()
Kalman-filter log-likelihood of the SIRD-GA state-space model
sird_ga_fit()
Maximum (approximate) likelihood estimation for the SIRD-GA model
sird_ga_fit_multistart()
Multi-start SIRD-GA fitting, with a practical-identifiability summary
sird_ga_bootstrap()
Parametric bootstrap confidence intervals for the SIRD-GA MLE

Growth curves on daily counts

logistic_curve()
Logistic growth curve
gompertz_curve()
Gompertz growth curve
richards_curve()
Richards growth curve
growth_incidence()
Daily incidence implied by a growth curve
fit_growth_incidence()
Fit one growth curve to daily counts by maximum likelihood
fit_ensemble_incidence()
Ensemble of growth curves fitted to daily counts
predict_band()
Forecast band of a growth-incidence fit

Segmentation of epidemic curves

bic_segment()
Offline segmentation of daily counts by penalised likelihood
edetect_segment()
Online segmentation of an epidemic curve with e-detectors

Ensembles on cumulative counts (earlier approach)

fit_growth_model()
Fit a single growth-curve model by nonlinear least squares
ensemble_weights()
Inverse-criterion ensemble weights
fit_ensemble()
Fit the full ensemble of growth-curve models to one data window
predict(<ensemble_fit>)
Predict the ensemble curve at arbitrary times
ensemble_bootstrap_ci()
Bootstrap confidence band for an ensemble fit
ensemble_bootstrap_params()
Bootstrap confidence intervals for each growth model's parameters
split_mse()
Mean squared error of a split at a single candidate partition point
split_mse_single()
Best single-model split MSE at a candidate partition point (fast proxy)
find_partition_point()
Grid search for a single structural change (partition) point
permutation_test_partition()
Permutation test for a single candidate structural change point
fit_piecewise_ensemble()
Sequential piecewise ensemble model
predict(<piecewise_fit>)
Predict from a piecewise ensemble fit
smooth_series()
Centered moving-average smoother

Plotting

plot_ensemble_fit()
Plot an ensemble fit against the observed data
plot_partition_profile()
Plot an MSE (or AIC) profile from a partition-point grid search
plot_piecewise_fit()
Plot a fitted piecewise ensemble curve, with confirmed partition points
plot_sird_ga_fit()
Plot observed vs. fitted SIRD-GA incidence, with an optional bootstrap band

Data

paraiba_covid19
COVID-19 surveillance data, Paraíba, Brazil (2020)
paraiba_population
Population of Paraíba, Brazil