= Solution
Let $P(t)=e^{Qt}$ be the <transition probability matrix> of the four-state <continuous-time Markov chain>, and put $N=\{S,R\}$ for a negative test and $P=\{E,I\}$ for a positive test. Starting susceptible at time zero, the likelihood contribution is
$$
\sum_{a\in N}\sum_{b\in P}\sum_{c\in N}
P_{Sa}(1)P_{ab}(1)P_{bc}(1).
$$
Equivalently, with indicator diagonal matrices $D_N,D_P$ and the susceptible basis vector $e_S$ it is
$$
e_S^TP(1)D_NP(1)D_PP(1)D_N\mathbf1.
$$
This sums over every hidden state sequence compatible with the three test results.
Back to article page