Solution (source code)

= Solution

Ignoring factors that do not depend on $\theta$, each observed side-effect contributes $\theta e^{-\theta x_i}$ and each censored observation contributes $e^{-\theta x_i}$. Thus
$$
L(\theta)\propto\theta^{v_+}e^{-\theta x_+},
\qquad
\ell(\theta)=v_+\log\theta-\theta x_++\text{constant}.
$$
The <score equation> $v_+/\theta-x_+=0$ gives
$$
\widehat\theta=\frac{v_+}{x_+}.
$$
This event-count divided by person-time estimator is the sample analogue of the expectation ratio in part iv.