Algorithm Search⌘K

Definitionintro

Hazard function

Also called hazard rate, force of mortality.

The instantaneous event rate at t among those still at risk, f(t) / S(t). The cumulative hazard H(t) satisfies S(t) = exp(-H(t)).

The hazard function of an event time TT gives, at each time tt, the rate at which events happen among the subjects who have not yet had one. If h(t)=0.02h(t) = 0.02 per day, then about 2% of those still at risk at day tt have the event during the next day, when the hazard is roughly constant over that day. The hazard is the natural object of survival analysis for three reasons. It describes how risk changes with time, rising with wear-out and falling after a dangerous early period. Censoring that is independent of the event leaves it unchanged among those still observed, so it can be estimated from the risk sets. And covariates multiply it by a constant factor in the main regression model, the Cox model. The hazard determines the survival function through the cumulative hazard HH.

Definition

Continuous time. Let T≥0T \ge 0 have a density ff and survival function S(t)=P(T>t)S(t) = P(T > t). The hazard function is

h(t)=lim⁡Δ↓0P(t≤T<t+Δ∣T≥t)Δ=f(t)S(t),S(t)>0,h(t) = \lim_{\Delta \downarrow 0} \frac{P(t \le T < t + \Delta \mid T \ge t)}{\Delta} = \frac{f(t)}{S(t)}, \qquad S(t) > 0,

the conditional probability of an event in a short interval after tt, given that none happened before tt, per unit of time. The cumulative hazard is

H(t)=∫0th(u) du.H(t) = \int_0^t h(u)\, du.

Since f=−S′f = -S', the hazard is h=−S′/S=−(log⁡S)′h = -S'/S = -(\log S)', and integrating from 0 with S(0)=1S(0) = 1 gives

S(t)=exp⁡(−H(t)),f(t)=h(t)exp⁡(−H(t)).S(t) = \exp(-H(t)), \qquad f(t) = h(t)\exp(-H(t)).

So any one of SS, ff, hh and HH determines the others. Conversely, any function h≥0h \ge 0 with ∫0th<∞\int_0^t h < \infty for each tt is the hazard of some TT, which is proper when ∫0∞h=∞\int_0^\infty h = \infty. A hazard has units of one over time, and it can exceed 1.

Discrete time. If TT takes values t1<t2<⋯t_1 < t_2 < \cdots, the hazard at tjt_j is the probability

hj=P(T=tj∣T≥tj),h_j = P(T = t_j \mid T \ge t_j),

the cumulative hazard is H(t)=∑tj≤thjH(t) = \sum_{t_j \le t} h_j, and

S(t)=∏tj≤t(1−hj).S(t) = \prod_{t_j \le t} (1 - h_j).

Here S≠exp⁡(−H)S \ne \exp(-H): since −log⁡(1−x)≥x-\log(1 - x) \ge x, S(t)≤exp⁡(−H(t))S(t) \le \exp(-H(t)), with near equality when every hjh_j is small. A general TT, with both a density part and atoms, has S(t)=∏u≤t(1−dH(u))S(t) = \prod_{u \le t}(1 - dH(u)), a product integral that reduces to each formula above in its case.

Proportional hazards. Two groups have proportional hazards when h1(t)=θ h0(t)h_1(t) = \theta\, h_0(t) for all tt, with a constant hazard ratio θ\theta. Then H1=θH0H_1 = \theta H_0 and S1=S0θS_1 = S_0^\theta in continuous time.

Examples and non-examples

Uniform on (0,1)(0, 1). f(t)=1f(t) = 1 and S(t)=1−tS(t) = 1 - t, so h(t)=1/(1−t)h(t) = 1/(1 - t), which grows without bound as t→1t \to 1, and H(t)=−log⁡(1−t)H(t) = -\log(1 - t), so exp⁡(−H(t))=1−t=S(t)\exp(-H(t)) = 1 - t = S(t). At t=0.9t = 0.9 the hazard is 10 per unit time: among those left at 0.9, the events arrive at that rate, and all of them happen within the remaining 0.1.

A discrete example. TT uniform on {1,2,3,4}\{1, 2, 3, 4\} has h1=14h_1 = \frac14, h2=13h_2 = \frac13, h3=12h_3 = \frac12, h4=1h_4 = 1. Then S(3)=34⋅23⋅12=14S(3) = \frac34 \cdot \frac23 \cdot \frac12 = \frac14, while H(3)=14+13+12=1312H(3) = \frac14 + \frac13 + \frac12 = \frac{13}{12} and exp⁡(−1312)≈0.338\exp(-\frac{13}{12}) \approx 0.338, larger than S(3)S(3) as the inequality says.

Parametric shapes.

model h(t)h(t) H(t)H(t) shape
exponential λ\lambda λt\lambda t constant
Weibull kλ(λt)k−1k\lambda(\lambda t)^{k - 1} (λt)k(\lambda t)^k rising for k>1k > 1, falling for k<1k < 1
Gompertz aebta e^{bt} ab(ebt−1)\frac{a}{b}(e^{bt} - 1) rising exponentially for b>0b > 0

A constant hazard is the memoryless case. Events in a population with a constant hazard λ\lambda and total time at risk LL are approximately a Poisson count with mean λL\lambda L, and λ^=d/L\hat\lambda = d/L, events over time at risk, is the maximum likelihood estimate under right censoring. Human mortality has a bathtub shape: high in the first year, lowest in childhood, and then close to Gompertz in adult ages.

A mixture. Half of a population has hazard 1 and half has hazard 3. The population survival is S(t)=12(e−t+e−3t)S(t) = \frac12(e^{-t} + e^{-3t}) and the population hazard is

h(t)=e−t+3e−3te−t+e−3t=1+21+e2t,h(t) = \frac{e^{-t} + 3e^{-3t}}{e^{-t} + e^{-3t}} = 1 + \frac{2}{1 + e^{2t}},

which falls from 2 at t=0t = 0 toward 1, although no individual's hazard changes. The high-risk subjects leave the risk set first. A falling population hazard therefore does not show that risk falls for anyone; frailty models describe this effect.

Non-examples.

  • Not a probability. In continuous time h(t)h(t) is a rate, and h(t)=10h(t) = 10 is possible, as in the uniform example. Only h(t)Δh(t)\Delta for a short Δ\Delta approximates a probability. In discrete time hjh_j is a probability.
  • Not the density. f(t)f(t) is the unconditional rate, relative to everyone at time 0. h(t)h(t) is relative to those still at risk. For the uniform on (0,1)(0, 1) the density is flat while the hazard rises to infinity.
  • The cumulative hazard is not a probability. H(t)H(t) can exceed 1, and 1−exp⁡(−H(t))1 - \exp(-H(t)) is the probability of an event by tt. H(t)H(t) is the expected number of events by tt in a Poisson process with intensity hh, where events recur and the rate at time tt is h(t)h(t).
  • A hazard ratio is not a ratio of risks. With θ=2\theta = 2 and S0(t)=0.5S_0(t) = 0.5, the event probabilities by tt are 0.50.5 and 1−0.52=0.751 - 0.5^2 = 0.75, a risk ratio of 1.51.5.
  • Survival function. S=exp⁡(−H)S = \exp(-H) in continuous time and S=∏(1−hj)S = \prod(1 - h_j) in discrete time; see survival function.
  • Estimation. At each distinct event time tjt_j, with djd_j events among njn_j at risk, dj/njd_j/n_j estimates the discrete hazard. Summing gives the Nelson-Aalen estimator of HH, and multiplying 1−dj/nj1 - d_j/n_j gives the Kaplan-Meier estimator of SS. A smooth estimate of hh itself needs kernel smoothing of the Nelson-Aalen increments.
  • Comparing groups. The log-rank test tests equality of hazards, and it is the score test of the Cox model with a group indicator, so it is aimed at proportional hazards. The Cox model writes h(t∣x)=h0(t)exTβh(t \mid x) = h_0(t) e^{x^{\mathsf T}\beta}, with an unspecified baseline h0h_0.
  • Cause-specific hazards. With several event types, each type has its own hazard hk(t)h_k(t), the rate of type kk events among those still free of all events, and ∑khk\sum_k h_k is the hazard of the first event. This is the starting point of competing risks.

References

  1. John P. Klein and Melvin L. Moeschberger, Survival Analysis, Techniques for Censored and Truncated Data, 2nd edition, Springer, 2003, Chapter 2 (the hazard function and the cumulative hazard, their relations to the survival function and the density, and the hazards of common parametric models)
  2. John D. Kalbfleisch and Ross L. Prentice, The Statistical Analysis of Failure Time Data, 2nd edition, Wiley, 2002, Chapter 2 (the hazard in continuous and discrete time and the product-integral form of the survivor function)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/76MWP4/text.yaml