Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Maximum Likelihood for Parametric Survival Models

Survival Models Review · Tutorial 116 of 697

Maximum Likelihood for Parametric Survival Models

Learn to construct a parametric survival likelihood from observed event and censoring times, and use its score to estimate model parameters.

Intermediate 11 min read

What You'll Learn

  • Define the observed time and event indicator for right-censored data.
  • Construct the event-time likelihood from density and survival contributions.
  • Derive a general score equation and explain when numerical maximization is needed.
  • Calculate an exponential rate estimate and a Weibull scale estimate with censored observations.
  • Explain how independent censoring, model assumptions, and likelihood diagnostics affect inference.

Why Censoring Changes the Likelihood

A parametric survival model describes the distribution of an event time \(T\), such as time from enrollment to disease progression. In many studies, the event is not observed for every participant: follow-up may end first, or a participant may withdraw. A censored observation still tells us something important. If a person is known to be event-free through month 8 and then leaves the study, the event time is not known to equal 8 months; it is known to exceed 8 months.

Maximum likelihood estimation uses that distinction directly. An observed event contributes a density at its observed time. A right-censored observation contributes the probability of surviving beyond its last observed time. Treating censored times as events instead changes the data being modeled and generally biases estimates.

Definition: For participant \(i\), let \(T_i\) be the event time and \(C_i\) the censoring time. The observed time is \(Y_i=\min(T_i,C_i)\), and the event indicator is \(\delta_i=I(T_i\leq C_i)\), where \(\delta_i=1\) denotes an observed event and \(\delta_i=0\) denotes right censoring. Let \(f(t;\theta)\) and \(S(t;\theta)=P(T>t;\theta)\) be the event-time density and survival function under a parametric model with parameter vector \(\theta\). The event-time likelihood for independent right censoring is \(L(\theta)=\prod_{i=1}^n f(Y_i;\theta)^{\delta_i}S(Y_i;\theta)^{1-\delta_i}\).

The likelihood above is for the event-time parameters. It omits the censoring-process contribution under the usual independent-censoring assumption: the censoring mechanism does not depend on the event time, and its parameters are distinct from the event-time parameters of interest. If censoring is independent only after conditioning on measured covariates, that assumption and the event-time model should be stated conditionally on those covariates. If censoring is informative, the displayed likelihood alone may not give valid inference for the event-time distribution.

From Likelihood to Score Equations

Taking logarithms turns a product of contributions into a sum, which is easier to maximize. The log-likelihood and score vector are

$$ \ell(\theta)=\sum_{i=1}^n\left\{\delta_i\log f(Y_i;\theta)+(1-\delta_i)\log S(Y_i;\theta)\right\},\qquad U(\theta)=\frac{\partial\ell(\theta)}{\partial\theta}. $$

An interior maximum-likelihood estimate \(\hat{\theta}\) ordinarily satisfies \(U(\hat{\theta})=0\). This is a necessary condition, not by itself proof of a maximum: one must also check the likelihood and parameter boundaries. For many parametric survival models, the score equations have no closed-form solution and are solved numerically. The observed information, \(J(\hat{\theta})=-\partial^2\ell(\theta)/\partial\theta\partial\theta^\mathsf{T}\) evaluated at \(\hat{\theta}\), can provide an approximate covariance matrix \(J(\hat{\theta})^{-1}\) under regularity conditions and adequate information in the data.

The different contributions are also visible in the score:

$$ U(\theta)=\sum_{i=1}^n\left\{\delta_i\frac{\partial\log f(Y_i;\theta)}{\partial\theta} +(1-\delta_i)\frac{\partial\log S(Y_i;\theta)}{\partial\theta}\right\}. $$

Thus a censored observation is not discarded and is not treated as an event. Its score contribution is the derivative of the log probability of remaining event-free through the censoring time.

Worked Example: Exponential Rate With Right Censoring

Suppose four hypothetical participants are followed for a time-to-event outcome, measured in months. Their observed times are 2, 3, 4, and 5 months, and the event indicators are 1, 1, 0, and 1. Assume an exponential model with rate \(\lambda>0\), so \(f(t;\lambda)=\lambda e^{-\lambda t}\) and \(S(t;\lambda)=e^{-\lambda t}\). Assume censoring is independent of event time.

There are \(d=3\) observed events and the sum of all observed follow-up times is \(2+3+4+5=14\) months. The likelihood includes a density for each of the three events and a survival probability for the censored observation:

$$ L(\lambda)=(\lambda e^{-2\lambda})(\lambda e^{-3\lambda})(e^{-4\lambda})(\lambda e^{-5\lambda}) =\lambda^3e^{-14\lambda}. $$

The log-likelihood is \(\ell(\lambda)=3\log\lambda-14\lambda\). Its score is \(U(\lambda)=3/\lambda-14\). Setting the score to zero gives \(3/\lambda=14\), so \(\hat{\lambda}=3/14=0.2143\) per month. The second derivative is \(-3/\lambda^2<0\), confirming a local maximum; the log-likelihood tends downward at both parameter boundaries, so this is the maximum. The fitted model estimates an event rate of 0.2143 per month. For example, its fitted survival probability at 6 months is \(e^{-6(3/14)}\approx0.2765\).

A General Derivation and a Weibull Estimate

A useful special case illustrates how the score depends on the event indicators. For an exponential model, each event contributes \(\log\lambda-\lambda Y_i\), while each censored observation contributes \(-\lambda Y_i\). Summing gives

$$ \ell(\lambda)=d\log\lambda-\lambda\sum_{i=1}^nY_i,\qquad U(\lambda)=\frac{d}{\lambda}-\sum_{i=1}^nY_i. $$

Equating the score to zero yields \(\hat{\lambda}=d/\sum_iY_i\). The numerator counts observed events; the denominator is total observed time at risk. This result follows from the censored-data likelihood, not from counting censored participants as event-free forever.

For a further example, parameterize a Weibull model by shape \(k>0\) and scale \(\lambda>0\): \(S(t)=\exp[-(t/\lambda)^k]\) and \(f(t)=\frac{k}{\lambda}(t/\lambda)^{k-1}\exp[-(t/\lambda)^k]\). If \(k\) is fixed, the log-likelihood terms involving \(\lambda\) are

$$ \ell(\lambda)=d\log k-dk\log\lambda+(k-1)\sum_{\delta_i=1}\log Y_i -\frac{\sum_iY_i^k}{\lambda^k}. $$

Differentiating gives \(U(\lambda)=-dk/\lambda+k\sum_iY_i^k/\lambda^{k+1}\). An interior score root therefore satisfies \(\hat{\lambda}^k=\sum_iY_i^k/d\), or \(\hat{\lambda}=(\sum_iY_i^k/d)^{1/k}\). This closed form applies only when the shape \(k\) is fixed; estimating both shape and scale generally requires solving the joint score equations.

Worked Example: Weibull Scale With Fixed Shape

Consider hypothetical observations \(Y=(1,2,3,4)\) months with event indicators \((1,1,0,1)\). Assume the Weibull shape is fixed at \(k=2\), and censoring is independent. There are \(d=3\) events, and the scale estimate is

$$ \hat{\lambda}=\left(\frac{1^2+2^2+3^2+4^2}{3}\right)^{1/2} =\left(\frac{30}{3}\right)^{1/2} =\sqrt{10}\approx3.162\text{ months}. $$

The censored observation at 3 months contributes \(3^2=9\) to the sum in the numerator, even though it contributes no event density. It contributes survival information through \(S(3)\). The scale estimate is expressed in months; the shape parameter is dimensionless. The calculation relies on the specified Weibull form, the fixed shape, and independent right censoring.

Reading Individual Contributions and Checking Assumptions

The density and survival contributions can differ substantially in size, as the next example shows. For the lognormal model, \(\log T\sim N(\mu,\sigma^2)\), where \(\sigma>0\). Its density is \(f(t)=\phi((\log t-\mu)/\sigma)/(t\sigma)\), and its survival function is \(S(t)=1-\Phi((\log t-\mu)/\sigma)\), with \(\phi\) and \(\Phi\) the standard normal density and distribution function.

Worked Example: Event Density Versus Censoring Survival

Suppose, hypothetically, one participant has an event at 2 months and another is censored at 3 months. For illustration, evaluate their likelihood contributions under a lognormal model with \(\mu=\log 2\) and \(\sigma=0.5\). These parameter values are specified for calculation; this small data set is not being used to estimate them.

For the event at 2 months, \(z=(\log 2-\mu)/\sigma=0\). Since \(\phi(0)=0.3989\), its density contribution is \(f(2)=0.3989/(2\times0.5)=0.3989\) per month. The contribution is a density, so it has inverse-time units.

For the censoring at 3 months, \(z=(\log 3-\log 2)/0.5\approx0.8109\), and \(S(3)=1-\Phi(0.8109)\approx0.2087\). This contribution is a dimensionless probability: under the specified model, the probability of an event time exceeding 3 months is approximately 0.2087. The likelihood contribution for the two observations is therefore approximately \(0.08326\) per month using the unrounded contributions. Replacing the second contribution with a density at 3 months would incorrectly assert that an event occurred then.

The likelihood calculation is meaningful only if the assumed event-time model and censoring assumptions are defensible. In practice, examine whether the model’s implied survival pattern is plausible over the observed follow-up, whether the data contain enough events to estimate the parameters, and whether numerical optimization converges to a stable maximum. A nearly flat likelihood, estimates at parameter boundaries, large standard errors, or materially different estimates from different starting values are warnings to investigate. A model can converge successfully and still be a poor description of the event-time distribution.

The independent-censoring assumption also deserves substantive scrutiny. Administrative study closure is often plausibly independent of an individual’s event time, conditional on study entry and relevant design factors. Withdrawal because a participant’s health is worsening may be informative. If event risk and censoring remain associated after conditioning on observed covariates, the ordinary event-time likelihood may be inadequate. The likelihood also assumes the event-time distribution is correctly specified; precise estimation under a misspecified distribution does not make the model correct.

How This Likelihood Differs From Other Survival Approaches

Parametric maximum likelihood uses a specified distribution, such as exponential, Weibull, or lognormal, to describe event times. Its advantages include a compact set of parameters and the ability to estimate survival beyond observed event times, but that extrapolation depends on the model being suitable. The Kaplan–Meier estimator instead estimates survival nonparametrically over observed follow-up and does not impose one of these parametric distributions; it does not provide the same parametric extrapolation.

The Cox proportional hazards model uses a partial likelihood for regression coefficients rather than specifying a full parametric distribution for the baseline event-time distribution. It is a different modeling strategy, not a reason to change the event-versus-censoring contributions in a parametric likelihood. Choosing among parametric distributions requires attention to fit and scientific plausibility, not merely which model gives the largest likelihood when models have different structures or parameter counts.

Common pitfall: “The participant was censored at 4 months, so I will enter 4 months as an event time.” That reasoning confuses the last known event-free time with the unobserved event time. The correction is to use \(S(4;\theta)\), the probability of remaining event-free beyond 4 months, as the censored participant’s contribution.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. For an exponential model, four observed times are 1, 2, 3, and 4 months, with indicators 1, 0, 1, and 0. Find the maximum-likelihood rate estimate.
  2. What likelihood contribution does a participant censored at time \(c\) make, and what does it mean?
  3. In the fixed-shape Weibull model, why does a censored time appear in \(\sum_iY_i^k\)?
  4. State two assumptions needed to use the ordinary right-censored event-time likelihood for the event parameters.

Solutions. (1) There are \(d=2\) events and total observed time \(1+2+3+4=10\) months, so \(\hat{\lambda}=2/10=0.2000\) per month. (2) The contribution is \(S(c;\theta)\), the probability under the model that the event time exceeds \(c\). (3) Censoring provides survival information through time \(Y_i\), so its contribution affects the scale score even though it supplies no event density. (4) The event-time distribution must be correctly specified for the intended parametric inference, and censoring must be independent of the event time (or conditionally independent given modeled covariates), with no shared unknown parameters that make the censoring process non-ignorable.

Clinical Biostats