Interactive simulator for growth curve models — from simple exponential growth to the Generalized Richards Model (GRM). Adjust parameters and run to see how each model shapes an epidemic curve. Example presets cover common outbreak patterns. Use the log-scale toggle and growth rate panel to build intuition for how each model behaves across its full parameter range.
Nesting structure
Exponential ⊂ GGM (add p) ⊂ GLM (add K) ⊂ GRM (add a)
Logistic ⊂ Richards (add a) ⊂ GRM (add p)
GLM nests Logistic (p=1) and GGM (K→∞)
Gompertz: asymmetric S-curve with fixed inflection at K/e — independent branch
The GRM nests all single-wave phenomenological models as special cases.
Parameters defined
r = intrinsic growth rate (per time unit). Controls how fast cases multiply early on.
K = final epidemic size (carrying capacity). Total cases at saturation.
p = scaling of growth (GGM, GLM, GRM). p=1 → exponential early growth; p<1 → sub-exponential (polynomial). Captures spatial heterogeneity and clustering.
a = asymmetry (Richards, GRM). a=1 → symmetric (logistic); a<1 → fast rise / slow decline; a>1 → slow rise / fast decline.
t_m = inflection time. Time of peak incidence / maximum growth rate.
I₀ = initial condition. Cumulative cases at t=0 (for cumulative models) or seed cases (GGM, GLM, GRM).
Phenomenological models describe the shape of an epidemic curve without assuming a transmission mechanism. They are fast to fit, easy to interpret, and well-suited for short-horizon forecasting when only case counts are available. Their main limitation is that parameters have no direct mechanistic meaning — unlike R₀ in compartmental models — and they cannot capture interventions, multiple waves, or population structure without extension.
1 — Generate synthetic data
Choose a "true" model and parameters, add observation noise, and generate synthetic case counts. This simulates what surveillance data would look like if the epidemic followed this model exactly. The goal of fitting is to recover these true parameters from the noisy observations.
How synthetic data is generated: The true model produces a deterministic incidence curve I(t). Observed counts Y_t are then drawn from a noise distribution around that curve:
Poisson: Y_t ~ Poisson(I(t)) — variance = mean, appropriate for well-reported outbreaks.
Negative Binomial: Y_t ~ NegBin(I(t), θ) — variance = I(t) + I(t)²/θ, appropriate when clustering or reporting heterogeneity inflates variance. Smaller θ = more overdispersion.
Normal: Y_t ~ Normal(I(t), σ²) — additive Gaussian noise with SD σ. Appropriate when errors are symmetric and not count-structured. Corresponds to SSE loss function.
Match your loss function to your noise type for statistically consistent estimation (Poisson noise → Poisson deviance; NB noise → NB deviance; Normal noise → SSE).
True model
True parameters
Data settings
Total time periods
Periods used for fitting; remainder = hold-out
Observation error distribution
θ→∞ ≈ Poisson; θ<1 = high overdispersion
SD of additive Gaussian noise on incidence
For reproducibility
Synthetic epidemic data
Blue dots = calibration observations. Red dots = hold-out (forecast window). Green dashed = true mean I(t).
2 — Manual fitting
Adjust parameters below and watch the fitted curve update on the chart. Try to minimize the loss function by eye — this builds intuition for what fitting algorithms do automatically.
Loss functions:
SSE (Sum of Squared Errors): L = Σ (Y_t − Î(t))². Equivalent to MLE under Normal/Gaussian errors. Use when noise type = Normal.
Poisson deviance: L = −2 Σ [Y_t · ln(Î(t)) − Î(t)]. Correct likelihood for Poisson counts. Use when noise type = Poisson.
NB deviance: L = −2 Σ [Y_t · ln(μ_t/(μ_t+θ)) + θ·ln(θ/(μ_t+θ))]. Correct for overdispersed counts. Use when noise type = Negative Binomial.
Match your loss function to your noise type for statistically consistent estimation.
Loss function
Parameters to fit
3 — Auto-fit (Nelder-Mead optimizer)
Click to run the Nelder-Mead simplex optimizer. It searches parameter space to minimize the selected loss function — the same principle used by standard fitting software, without requiring gradient computation.
Nelder-Mead in plain language: Start with a simplex (triangle in 2D, tetrahedron in 3D, etc.) of parameter guesses. At each step, reflect the worst-performing vertex through the centroid of the others. If the reflected point is better, expand; if worse, contract; if very bad, shrink the whole simplex toward the best point. Repeat until the simplex is tiny (convergence). Fast and robust for low-dimensional problems (≤6 parameters) — no gradients needed. Standard software implementations include scipy.optimize.minimize (Python), optim() (R), fminsearch (MATLAB), and Optim.jl (Julia).
4 — Forecast performance
Fitted curve extrapolated into the hold-out window. Metrics compare fitted values against true mean μ(t) — in real research, you would compare against observed counts.
Forecast metrics:
MAE = (1/h) Σ |μ(t) − Î(t)| — mean absolute error, robust, same units as data.
RMSE = √[(1/h) Σ (μ(t) − Î(t))²] — penalizes large errors more than MAE.
MAPE = (100/h) Σ |μ(t)−Î(t)|/μ(t) — scale-free percentage error.
AIC = n·ln(SSE/n) + 2k — penalizes model complexity (k = number of parameters). Lower = better.
BIC = n·ln(SSE/n) + k·ln(n) — stronger penalty than AIC; favors simpler models more as n grows.
For real research — coverage, WIS, and probabilistic scoring — use parametric bootstrap CIs in standard statistical computing environments.
5 — Bootstrap parameter uncertainty (M=300)
Parametric bootstrap: simulate M=300 synthetic datasets from the auto-fitted model, refit to each, and collect the distribution of parameter estimates. The histogram shows the sampling distribution — how much estimates vary across datasets of this size.
Parametric bootstrap in plain language:
1. Fit the model to observed data → get parameter estimates (r̂, K̂, p̂, â).
2. Use those estimates to simulate M new synthetic datasets from the same noise model.
3. Refit the model to each synthetic dataset → collect M sets of estimates.
4. The histogram of each parameter's estimates is an empirical approximation to its sampling distribution.
5. The 2.5th–97.5th percentiles give a 95% bootstrap CI — no distributional assumptions required.
Bias = mean(bootstrap estimates) − point estimate. If non-zero, the estimator is biased for this n.
For publication-quality uncertainty: use M≥1000 with standard implementations in your preferred computing environment.
6 — Practical identifiability scan (vary n)
Runs M=100 bootstrap refits at each of n = 10, 15, 20, 30, 50 time points. The coefficient of variation (CV = SD/mean) of each parameter's bootstrap distribution measures practical identifiability — how precisely that parameter can be estimated from data of that length.
Structural vs practical identifiability:
Structural identifiability: can the parameters be uniquely determined from perfect, noise-free data? A model may be structurally identifiable yet practically unidentifiable from short or noisy real data.
Practical identifiability: can the parameters be precisely estimated from realistic data? Measured by CV of bootstrap distribution. CV < 0.10: well identified (green). CV 0.10–0.30: moderate (yellow). CV > 0.30: poorly identified (red) — estimates are highly variable, suggesting more data or fewer parameters are needed.
GRM with small n: K and a are typically the hardest to identify — their histograms remain wide even when r and p have converged. This is why fitting GRM to fewer than ~15–20 data points is not recommended.
7 — For real research: standard tools
What this simulator teaches vs what to use in practice
This page demonstrates the concepts of fitting, forecasting, bootstrap uncertainty, and practical identifiability using in-browser simulation. The Nelder-Mead implementation here is intentionally simplified for teaching. For real research applications — fitting to observed outbreak data, publication-quality CIs, model selection, and probabilistic forecasting — use standard implementations in your preferred computing environment.
Standard approaches by task
Fitting (MLE/NLS): gradient-free optimizers (Nelder-Mead, BFGS) or nonlinear least squares, available in all major statistical computing environments (R, Python, Julia, MATLAB, SAS, Stata).
Bootstrap CIs: parametric bootstrap with M≥1000; standard in all environments. Profile likelihood CIs: more accurate than Wald CIs, available via likelihood profiling functions.
Model selection: AIC, BIC, and likelihood ratio tests for nested models.
Probabilistic forecasting: forecast ensembles, prediction intervals from bootstrap, WIS scoring.
Structural identifiability analysis: symbolic methods (STRIKE-GOLDD, StructuralIdentifiability.jl) for ODE-based models.
The workflow demonstrated here — generate → fit → forecast → bootstrap → identifiability — is the same workflow used in published epidemic modeling studies. The difference between this simulator and a research pipeline is computational scale (M=300 vs M=1000+), real data (surveillance counts vs synthetic), and rigorous uncertainty propagation through all model components.