covid19uk issueshttps://fhm-chicas-code.lancs.ac.uk/jewell/covid19uk/-/issues2020-12-09T11:01:30Zhttps://fhm-chicas-code.lancs.ac.uk/jewell/covid19uk/-/issues/13Branching process proposal2020-12-09T11:01:30ZChris JewellBranching process proposalChris JewellChris Jewellhttps://fhm-chicas-code.lancs.ac.uk/jewell/covid19uk/-/issues/12Poisson observation model2020-12-09T11:00:53ZChris JewellPoisson observation modelChris JewellChris Jewellhttps://fhm-chicas-code.lancs.ac.uk/jewell/covid19uk/-/issues/10Continuous time likelihood calculation2020-10-21T11:01:10ZChris JewellContinuous time likelihood calculation# Purpose
This document outlines a new form of the likelihood for an epidemic model, using a continuous-time approximation to a discrete Markov process.
# State transition model
Epidemic models are represented as State Transition Models...# Purpose
This document outlines a new form of the likelihood for an epidemic model, using a continuous-time approximation to a discrete Markov process.
# State transition model
Epidemic models are represented as State Transition Models, where at any time in an epidemic individuals are assumed to exist in one of a number of states $`s = 1, \dots, S`$ connected by directed edges, or transitions, $`r=1,\dots,R`$. For example:
```mermaid
graph LR;
s1 -- r1 --> s2;
s2 -- r2 --> s3;
s2 -- r3 --> s4;
```
# Notation
Let us assume a $`y_{tmr}`$ represents the number of events occurring at timepoint $`t`$ in epidemiological unit $`m=1,\dots,M`$ of type $`r=1,\dots,R`$, where $`r`$ represents a transition (or edge) in a State Transition Model graph. For convenience, we refer to the __event tensor__ `Y` with shape `[T, M, R]`.
We represent the number of individuals in each epidemiological unit $`m`$ at time $`t`$ in state $`s`$ as $`x_{tms}`$, and refer to a __state tensor__ `X` with shape `[T, M, S]`.
# Likelihood computation
Consider a timepoint $`t`$ and state $`s`$. Under the (approximate) continuous-time model, the probability of $`y_{tmr}`$ events transitioning _out_ of $`s`$ via transition $`r`$ at the end of a time interval $`\delta t`$ is
```math
f(y_{tmr} | \lambda_{mr}(t), x_{tms}) = (\lambda_{mr}(t))^{y_{tmr}} \exp \left( -x_{tms}\sum_{r \in o(s)} \lambda_{mr}(t) \delta t \right)
```
where $`\lambda_{mr}(t)`$ is the hazard rate for the $`r`$th transition, and $`o(s)`$ is the set of _outgoing_ transitions from state $`s`$.
__Remarks__:
* This is essentially survival analysis, where the lifespan function is a product of a hazard rate ($`\lambda_{mr}(t)`$) and survivor function
```math
S(T > t) = 1 - F(T \leq t) = \exp (-\lambda_{mr}(t) \delta t
```
under the exponential distribution.Alison HaleAlison Hale