3.6 Practice Problems

Problem 3.6.1. Ten patients have times (months) \(3, 5^+, 6, 8, 10^+, 12, 15^+, 18, 22^+, 24^+\), where \(^+\) marks censoring. Fit an exponential model: give \(\hat \lambda \), its standard error, the fitted median, and a \(95\%\) confidence interval for the median.

Show solution

Solution. \(d = 5\) events and \(T_{\mathrm {tot}} = 123\) months, so \(\hat \lambda = 5/123 = 0.0407\) per month, s.e. \(0.0407/\sqrt 5 = 0.0182\). The median is \(\log 2/\hat \lambda = 17.1\) months. On the log scale, \(\log \hat \lambda \pm 1.96/\sqrt 5\) gives \(\lambda \in (0.0169, 0.0977)\), and since the median is \(\log 2/\lambda \) the interval for the median is \((7.1, 41.0)\) months: very wide, because only five deaths were observed.

Problem 3.6.2. Explain why a censored subject contributes \(S(t_i)\) rather than \(f(t_i)\) to the likelihood, and what is assumed in doing so.

Show solution

Solution. For a censored subject we know only that \(T_i > t_i\), an event of probability \(S(t_i)\). Writing the joint probability of the observed data as \(\prod f^{\delta }S^{1 - \delta }\) times a factor for the censoring times assumes that censoring is independent of \(T_i\) (non-informative) and that its distribution does not involve \(\theta \), so that this factor can be dropped.

Problem 3.6.3. Show that for the Weibull model with \(k\) known, the maximum likelihood estimate of \(\lambda \) is \(\hat \lambda = \bigl (\sum t_i^k/d\bigr )^{1/k}\).

Show solution

Solution. With \(k\) fixed, \(\ell = \sum \delta _i(\log k + (k - 1)\log t_i) - dk\log \lambda - \lambda ^{-k}\sum t_i^k\). Then \(\partial \ell /\partial \lambda = -dk/\lambda + k\lambda ^{-k - 1}\sum t_i^k = 0\) gives \(\lambda ^k = \sum t_i^k/d\). For \(k = 1\) this is the exponential result \(T_{\mathrm {tot}}/d\).

Problem 3.6.4. In Example 3.4.1, the log-logistic model has log-likelihood \(-1160.9\) and the Weibull \(-1153.9\), both with two parameters. Which is preferred, and can a likelihood ratio test be used to compare them?

Show solution

Solution. With the same number of parameters, AIC prefers the larger log-likelihood: the Weibull, by \(2 \times 7.0 = 14\) in AIC, a large difference. A likelihood ratio test is not appropriate, because neither model is a special case of the other; AIC, or a graphical comparison, is used instead.

Problem 3.6.5. A survreg Weibull fit reports Intercept \(= 5.2\) and scale \(= 1.25\). Give \(k\) and \(\lambda \), say whether the hazard increases or decreases, and find the median.

Show solution

Solution. \(k = 1/1.25 = 0.8\) and \(\lambda = e^{5.2} = 181.3\). Since \(k < 1\) the hazard decreases with time. The median is \(\lambda (\log 2)^{1/k} = 181.3 \times 0.693^{1.25} = 181.3 \times 0.632 = 114.6\).

Problem 3.6.6. How many deaths must a study observe for the \(95\%\) confidence interval for an exponential rate to have upper limit no more than \(1.5\) times the lower?

Show solution

Solution. The interval is \(\hat \lambda e^{\pm 1.96/\sqrt d}\), so the ratio of the limits is \(e^{3.92/\sqrt d} \leq 1.5\), that is \(\sqrt d \geq 3.92/\log 1.5 = 9.67\), \(d \geq 94\) deaths, whatever the number of patients.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.