You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.Rmd
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -142,9 +142,11 @@ citation("epidist")
142
142
If using our methodology, or the methodology on which ours is based, please cite the relevant papers.
143
143
This may include:
144
144
145
-
*[Estimating epidemiological delay distributions for infectious diseases](https://www.medrxiv.org/content/10.1101/2024.01.12.24301247v1) by Park *et al.* (2024)
145
+
*[Estimating epidemiological delay distributions for infectious diseases](https://www.medrxiv.org/content/10.1101/2024.01.12.24301247v1) by Park *et al.* (2024) -- if using the latent model
146
146
*[Best practices for estimating and reporting epidemiological delay distributions of infectious diseases using public health surveillance and healthcare data](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1012520) by Charniga *et al.* (2024)
147
147
148
+
If using the marginal model, please also cite the [`primarycensored`](https://primarycensored.epinowcast.org/) package using `citation("primarycensored")`.
Copy file name to clipboardExpand all lines: vignettes/model.Rmd
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,7 @@ This then allows the modelling of the continuous distribution, adjusted for the
154
154
Whilst this is an approximation [@park2024estimating] showed good recovery of simulated distributions in a range of settings.
155
155
However, the use of two latent variables per observed delay means that this approach may scale poorly with larger datasets.
156
156
That being said this approach has been used successfully in multiple real-world outbreak settings ([@ward2022transmission]).
157
+
If using the latent model, please cite @park2024estimating in addition to `epidist`.
157
158
158
159
Mathematically this model is described as follows.
159
160
We look at the conditional probability that the secondary event $S$ falls between $S_L$ and $S_R$, given that the primary event $P$ falls between $P_L$ and $P_R$ and that the secondary event $S$ occurs before the truncation time $T$:
As before, $g_P(z \, | \, p_{L, i}, p_{R, i})$ represents the conditional distribution of the primary event given lower $P_L$ and upper $P_R$ bounds; this is equivalent to modelling the incidence in primary events.
179
180
181
+
# The marginal model
182
+
183
+
The marginal model corrects for the same biases as the latent model but integrates out the exact event times numerically, or analytically where closed-form solutions exist, rather than sampling latent variables.
184
+
This approach uses the primary event censored distribution implemented in the [`primarycensored`](https://primarycensored.epinowcast.org/) package [@primarycensored].
185
+
If using the marginal model, please cite `primarycensored` in addition to `epidist`.
186
+
187
+
Under the assumption that the forward distribution does not change within the censoring interval (i.e. $f_x = f$ for $x \in [P_L, P_R]$), the double censoring probability from Section \@ref(interval-censoring) simplifies to
For common delay and primary event distributions, such as gamma or lognormal delays with uniform primary events, `primarycensored` provides closed-form analytical solutions to this integral.
192
+
For other combinations, numerical integration is used.
193
+
194
+
Right truncation at time $T$ is handled by normalising the likelihood as in the latent model:
Removing the latent variables reduces the number of parameters that must be sampled, and where analytical solutions exist the likelihood can be evaluated without numerical integration.
200
+
In addition, identical observations can be aggregated and the likelihood computed once per unique combination of delay, censoring windows, and covariates.
201
+
Together these make the marginal model substantially more efficient than the latent model, particularly for larger datasets with daily-censored data where many observations share the same structure.
202
+
203
+
For the mathematical details of primary event censored distributions, including the survival function derivation and closed-form solutions for specific distributions, see `vignette("why-it-works", package = "primarycensored")` and `vignette("analytic-solutions", package = "primarycensored")`.
Copy file name to clipboardExpand all lines: vignettes/references.bib
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,13 @@ @article {park2024estimating
10
10
journal = {medRxiv}
11
11
}
12
12
13
+
@Manual{primarycensored,
14
+
title = {primarycensored: Primary Event Censored Distributions},
15
+
author = {Sam Abbott and Sam Brand and James Mba Azam and Carl Pearson and Sebastian Funk and Kelly Charniga},
16
+
year = {2025},
17
+
doi = {10.5281/zenodo.13632839},
18
+
}
19
+
13
20
@article{charniga2024best,
14
21
doi = {10.1371/journal.pcbi.1012520},
15
22
author = {Charniga, Kelly and Park, Sang Woo and Akhmetzhanov, Andrei R. and Cori, Anne and Dushoff, Jonathan and Funk, Sebastian and Gostic, Katelyn M. and Linton, Natalie M. and Lison, Adrian and Overton, Christopher E. and Pulliam, Juliet R. C. and Ward, Thomas and Cauchemez, Simon and Abbott, Sam},
0 commit comments