Models

The shedding curves fitted across the repository, and worked examples of fitting your own.

The curves

Three shapes, fitted to every analyte with enough data

All three are fitted on the log10 scale by censored maximum likelihood.

Exponential

c(t) = c₀ · e−a₀t

Pure decay from the reference event. It assumes shedding is already at its peak when the clock starts, which is often true when the clock starts at symptom onset and the study caught people late.

Gamma

c(t) = c₀ · tb₀ · e−a₀t

A rise to a peak at t = b₀/a₀, then decay. It needs observations after the reference event to see the rise, and its curve is undefined at t ≤ 0, so those readings are discarded.

Gamma shifted

c(t) = c₀ · (t−t₀)b₀ · e−a₀(t−t₀)

The same shape with shedding starting at t₀ rather than at the reference event. It exists because the reference event is not the same event across studies — symptom onset, enrollment, confirmation, vaccination and hospital admission all appear — and because the plain gamma was discarding tens of thousands of detected measurements recorded at exactly t = 0. Its t₀ is what makes those reference events commensurable.

Across all three, a₀ is the decay rate, giving a half-life of ln(2)/a₀; b₀ governs the rise; t₀ is the onset of shedding.

Read this before comparing them

Choosing between the three is not an AIC comparison. They are fitted to different observation sets — gamma drops every reading at t ≤ 0 and gamma-shifted keeps the detected ones — and AIC only compares models fitted to the same data. Check the measurement count before reading anything into the AIC.


How they are fitted

Non-detects are data

Roughly a third of the measurements in the repository are reported negative. They enter the likelihood as left-censored observations — carrying the information that the concentration was below the limit — rather than being dropped or replaced with a substituted value.

Dropping them biases decay rates slow and inflates simulated late-phase shedding, which is exactly the quantity a wastewater or transmission model is most sensitive to.

If you just want numbers

You do not have to fit anything

The fitted parameters ship with the Python package, so a transmission or wastewater model can consume them directly without refitting: load a study, take its curve, and simulate a cohort that carries inter-individual variability rather than tracing one average.

See what the package does →


Worked examples

Fitting shedding curves yourself

Both work through woelfel2020virological, so they can be read against each other.

Have a modelling notebook that uses Shedding Hub data? Send it to us and we will host it here alongside these.