Solution
= Solution
Use a three-state <continuous-time multi-state model> with transient infected state $I$ and absorbing recovered and dead states $R$ and $D$. If recovery and death have constant <transition intensities> $\gamma$ and $\mu$, its <Q-matrix> is
$$
Q=
\begin{pmatrix}
-(\gamma+\mu)&\gamma&\mu\\
0&0&0\\
0&0&0
\end{pmatrix},
$$
with state order $(I,R,D)$. This is also a <competing risks model>: recovery and death are the two mutually exclusive first events.