Accelerated Failure-Time Models › Formula
Machine Learning from ScratchAll chapters Accelerated Failure-Time Models › FormulaSection view · Sections in this chapter4 / 10 ↓
Reading tools Definitions, links & notes
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Positive event times allow us to model . The basic AFT model then assumes a linear location on this log scale and a common error distribution and scale across covariate profiles. The log transformation does not guarantee symmetry: normal errors are symmetric, while the minimum Gumbel errors used for Weibull lifetimes are not. A one-unit increase in a linearly entered covariate changes log time by its coefficient, giving a multiplicative factor on the time scale. Doubling a raw covariate is not generally a fixed one-unit change.
We begin with notation. For subject , let be the true event time, let be the censoring time, and let
be the observed time. Define the event indicator
Thus means we observed the event, and means the observation was right-censored. Let include an intercept and covariates, and let be the corresponding coefficient vector.
What we ultimately want is the conditional distribution of given , but the observed data give only partial information: for events we see , for censored subjects we only know that . The rest of this section does three things in order. We express the covariate effect as a location shift on the log scale and quantify it as a time ratio. We assemble a likelihood that handles events and censored observations in the same expression. We examine the two distributional choices that determine the shape of the resulting survival curves.
Log-time regression and acceleration factors
The AFT model writes the log event time as
where is a standardized error term with a chosen distribution, and is a scale parameter. In matrix notation,
Equivalently,
The two factors on the right have clearly separated roles. The first, , depends only on covariates and shifts the entire distribution of event times. The second, , is subject-level noise that has the same distribution for every subject. This separation is why AFT coefficients are interpretable: all of the covariate effect is carried by a single location shift on the log scale, and everything else is the shape of the error distribution.
To see what the shift means on the time scale, compare two subjects with covariate vectors that differ only in the -th component by one unit, and imagine that the individual noise is identical for both. Then
This ratio is the time ratio, also called the acceleration factor. If , then , so the event time is multiplied by about 1.22, or prolonged by 22.1 percent. If , then , so the event time is multiplied by about 0.82, or shortened by 18.1 percent. The same factor applies to every quantile of the event-time distribution, because the -th quantile of depends on covariates only through the common factor . That is the precise sense in which a covariate "stretches the clock."
For likelihood work it is more convenient to translate the model into a survival function. If is the survival function of the standardized error, then
Once , , and are fixed, the survival curve can be evaluated from the assumed error survival function. Cox regression can also produce survival curves after baseline estimation; the difference here is the explicit parametric event-time distribution. Different choices of give different tail shapes and different hazard patterns, which is the source of the modeling decision discussed later.
Censored likelihood contributions
For a censored subject, the observed record does not reveal ; it gives a lower bound on that time. Evaluating the event density at the censoring time would invent an observed event. The right-censoring decomposition resolves this by assigning the two kinds of observation two structurally different likelihood pieces:
- If subject has an observed event at , we have observed the value of , so its contribution is the density .
- If subject is censored at , the only information available is that , so its contribution is the probability of that event, the survival function .
Assume independent subjects, conditionally independent censoring, and censoring-law parameters distinct from the event-time parameters. After removing factors that do not depend on the fitted parameters, the likelihood is the product:
Taking logarithms turns the product into a sum:
To express each piece in terms of the standardized error, standardize each observation:
Because , the transformation from to has Jacobian
Therefore the density of is
where is the density of the standardized error. Taking logs gives
The Jacobian contributes to an event log density. For fixed observed times, the term does not depend on the fitted parameters: omitting that term alone changes absolute time-scale likelihood values, but not the maximizer. It also cancels from AIC differences when both models omit the same term on the same event records. The term does depend on a fitted parameter and must remain in the objective. Retaining the complete density avoids mismatched scoring conventions. The survival function transforms without a Jacobian, because it is a probability:
Substituting these expressions into the log-likelihood, we obtain the general AFT censored log-likelihood:
Two features of this expression deserve emphasis. First, the two halves of the summand are structurally different: an event contributes a density with its Jacobian, while a censored observation contributes a survival probability. Each subject activates exactly one of the two. Second, if no observation is censored, the second term vanishes. The remaining likelihood gives the same parameter estimates as ordinary log-location-scale regression on , differing from its log-time likelihood by the parameter-free sum . Every parametric AFT model, including Weibull, log-normal, and log-logistic, is expressed simply by plugging in the corresponding and in this formula.
Weibull and log-normal event-time models
The general likelihood is now in hand; the remaining decision is what to plug in for and . We compare two error distributions:
- The standard normal error is symmetric and produces a log-normal distribution for . Its hazard can rise and then fall, which allows a non-monotone risk pattern.
- The minimum Gumbel error is less familiar but produces the Weibull distribution for , which has a special algebraic connection to proportional hazards. That connection is what allows Weibull AFT coefficients to be translated into hazard ratios.
The distributions can give similar fits in part of the observed range while implying different tails. Their agreement in the middle is not guaranteed.
The survival curve comparison can be read alongside the corresponding hazard functions. Holding log-time location and scale fixed, the log-normal hazard is not forced to be monotone, while the Weibull hazard is monotone in this parameterization. The following curves use the same location and scale for both families, so the difference in shape comes from the error distribution rather than from a changed regression coefficient.
PythonIn [3]Expand
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
# Fixed illustrative values, not estimates. No random sampling or fitting is used.
t_hazard = np.linspace(0.25, 8.0, 400)
eta_hazard = 1.0
sigma_hazard = 0.6
z_hazard = (np.log(t_hazard) - eta_hazard) / sigma_hazard
hazard_lognormal = stats.norm.pdf(z_hazard) / (
sigma_hazard * t_hazard * stats.norm.sf(z_hazard)
)
hazard_weibull = (1.0 / (sigma_hazard * t_hazard)) * np.exp(z_hazard)
hazard_ylim = (0.0, 1.15 * max(hazard_lognormal.max(), hazard_weibull.max()))VisualizationOut [4]Expand

For the log-normal AFT model, . Then
where:
- : the standard normal cumulative distribution function
- : the event time
- : the log-time location for the covariate profile
- : the log-time scale parameter
The density is
where is the standard normal density. The hazard is the ratio
Here . The log-normal hazard can rise and later fall; it tends to zero both as and as . This is different from a Weibull hazard, whose direction is controlled by one shape parameter.
For the Weibull AFT model, follows the standard minimum Gumbel distribution, whose survival function is
where:
- : the standardized log-time value
- : the exponential of , which is always positive
- : the Gumbel survival probability, decreasing from 1 toward 0 as increases
Substituting gives
If we set the shape parameter and the scale parameter , this becomes the usual Weibull survival function
The density is
To derive the hazard, we use the definition . Differentiating the survival function with the chain rule,
Since , dividing by gives
This factorization is why the Gumbel error is useful here. Write the hazard as
The sum in the second factor uses only the slope terms, excluding the intercept. The term in brackets depends only on time and the baseline parameters, and the remaining factor is constant over time. That is the proportional hazards structure, with hazard ratio
for a one-unit increase in covariate . The sign flips relative to the AFT coefficient because a positive lengthens event times and therefore lowers the hazard. Among the two families studied here, the Weibull model has this proportional-hazards conversion; a log-normal AFT model does not generally have proportional hazards, because its hazard ratio changes with time. That distinction is the practical meaning of choosing one error distribution over the other.
Mathematical Properties
The acceleration interpretation can be made exact through the quantile function. If is the -th quantile of , then the -th quantile of given covariates is
For a one-unit change in , the ratio of quantiles is , independent of . This is the constant time-ratio property, and it is what justifies calling an acceleration factor rather than just a coefficient on the log scale.
The median depends on which we choose. For the log-normal model, the median is because the median of a standard normal is zero. For the Weibull model, the median is
because the minimum Gumbel median is . Solving gives , so the median shift is negative when multiplied by positive . The two models can therefore share the same and while having different medians and different tails.
Finally, fitting requires numerical care. The log-likelihood is not guaranteed to be globally concave in all parameters. For example, joint concavity can fail in the log-normal location and log-scale parameterization even without censoring. In practice we optimize numerically, parameterize as so that it stays positive, and use good starting values or multiple starts. Each parameterization needs its own existence and convergence checks; multiple starts do not establish a global optimum.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!