Basics for survival models based on hazard

To me, the basic concept of survival analysis is forgetful. And sometimes it tend to be mixed up. Then, I summarized it here. I actually need a load sign on this.


Derivation for survival model

Let \(T\) be the continuous survival time for a patient which is distributed from a probability density function (pdf) \(f(t)\), i.e., \(T \sim f(t)\). Then the probability that the patient has already died (Failed) at time \(t\) is obtained by \begin{align} F(t) = \int_0^t f(u)du, \nonumber \end{align} then the probability that the patient is still alive (Survive) at time \(t\) is \begin{align} S(t) = 1-F(t). \label{eq:suv1} \end{align} For those who have some difficulty in understanding this derivation, please see the example in the bottom of the page first.

The probability that the patient has not been died on or before a time \(t\) and (s)he dies between the time interval \((t,t + \Delta t]\) is expressed as: \begin{align} P(t < T \le t + \Delta t \mid t < T) = \frac{P(t < T \le t + \Delta t)}{P(t < T)} = \frac{F(t+\Delta t)-F(t)}{S(t)}. \nonumber \end{align} The hazard function \(h(t)\) is defined as \begin{align} h(t) &:= \lim_{\Delta t \to 0}\frac{1}{(t+\Delta t)-t}\frac{F(t+\Delta t)-F(t)}{S(t)} \nonumber \\ &= \frac{1}{S(t)}\lim_{\Delta t \to 0}\frac{F(t+\Delta t)-F(t)}{(t+\Delta t)-t} = \frac{f(t)}{S(t)}. \label{eq:suv2} \end{align} Since the first derivative of Eq.(\ref{eq:suv1}) with respect to \(t\) is \begin{align} \frac{d}{dt}S(t) &= \frac{d}{dt}\left( 1-F(t) \right)=-f(t) \Longleftrightarrow f(t)=-\frac{d}{dt}S(t), \label{eq:suv3} \end{align} Insert Eq.(\ref{eq:suv3}) into Eq.(\ref{eq:suv2}) and we get: \begin{align} h(t) = \frac{\displaystyle -\frac{d}{dt}S(t)}{S(t)} = -\frac{d}{dt} \log S(t). \label{eq:suv4} \end{align} We can see that the hazard function \(h(t)\) must be non-negative, since \(S(t)\) is monotonically decreasing function which means that \begin{align} S(t) \ge 0 \mbox{ and } \frac{d}{dt} S(t)<0 \Longleftrightarrow \frac{d}{dt} \log S(t)= \frac{\frac{d}{dt} S(t)}{S(t)}<0. \end{align} Integrate from \(0\) to \(t\) both side of Eq.(\ref{eq:suv4}), we get \begin{align} \int_0^t h(u)du = -\left(\log S(t)-\log S(0)\right)=-\log S(t), \label{eq:suv5} \end{align} because no one has not died at time \(0\) which means \(S(0)=1 \Leftrightarrow \log S(0)=0\). Multiply \(-1\) and exponentiate both side of Eq.(\ref{eq:suv5}) yields \begin{align} S(t) = \exp \left( - \int_0^t h(u)du \right). \end{align} From Eq.(\ref{eq:suv2}), the pdf of survival time \(f(t)\) can be obtained as follows: \begin{align} h(t)=\frac{f(t)}{S(t)} \Longleftrightarrow f(t) &= h(t) S(t) \nonumber \\ &= h(t)\exp \left( - \int_0^t h(u)du \right). \label{eq:suvpdf} \end{align}

Example

Suppose the hazard function is \(h(t)=6t\), the corresponding pdf for survival time \(f(t)\) can be derived from Eq.(\ref{eq:suvpdf}) as: \begin{align} f(t)&=h(t)\exp \left( - \int_0^t h(u)du \right) \nonumber \\ &= 6t \exp \left( - \int_0^t 6u du \right) \nonumber \\ &= 6t \exp \left(\left[-3u^2 \right]_0^t \right) \nonumber \\ &= 6t \exp \left(-3t^2 \right), \nonumber \end{align} and the survival function \(F(t)\) is obtained as: \begin{align} F(t) &= \int_0^t f(u)du \nonumber \\ &= \int_0^t 6u \exp \left(-3u^2 \right) du \nonumber \\ &= \left[ -\exp \left(-3u^2 \right)\right]_0^t \nonumber \\ &= -\exp \left(-3\cdot t^2 \right) - \left( -\exp \left(-3\cdot 0^2 \right) \right) \nonumber \\ &= 1-\exp \left(-3 t^2 \right) \nonumber \end{align} The curves for both functions \(f(t)\) and \(F(t)\) are plotted in the following figure.

Comments