Solution (source code)

= Solution

Let $I\in\{1,2\}$ denote eventual death or recovery, respectively; $T$ is the time from admission to that terminal event, and $\theta=\Pr(I=1)$. A patient still hospitalized at collection has <right censoring>: only $T>c$ is known, where $c$ is the elapsed time since admission. Both eventual outcomes are then unobserved. A recorded death or discharge is an observed terminal event in this <competing risks model>; discharge is not censoring of an otherwise observable later in-hospital death. Assume the observation deadline, conditional on relevant admission information, is noninformative for $(T,I)$.