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
docs: add marginal model section to model guide vignette
Closes#534. Adds a section describing the marginal model approach
which integrates out latent variables analytically using the
primarycensored package, with signposts to primarycensored vignettes
for mathematical details.
Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
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
179
180
+
# The marginal model
181
+
182
+
The marginal model corrects for the same biases as the latent model but integrates out the exact event times analytically rather than sampling latent variables.
183
+
This approach uses the primary event censored distribution implemented in the [`primarycensored`](https://primarycensored.epinowcast.org/) package.
184
+
185
+
Under the assumption that the forward distribution is shift-invariant (i.e. $f_x = f$ for all $x$), 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.
190
+
For other combinations, numerical integration is used.
191
+
192
+
Right truncation at time $T$ is handled by normalising the likelihood as in the latent model:
Since no latent variables are required, identical observations can be aggregated and the likelihood computed once per unique combination of delay, censoring windows, and covariates.
198
+
This makes the marginal model substantially more efficient than the latent model for larger datasets, particularly with daily-censored data where many observations share the same structure.
199
+
200
+
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")`.
0 commit comments