# Unkown Blogger Pursues a Deranged Quest for Normalcy

• ## Blog Stats

• 10,697 hits

## Hazard functions

Posted by ubpdqn on February 14, 2011

Most of my posts are exercises  to increase my understanding of the topic. This post is no exception.

The hazard function $h(t)$  can be conceptualized as the conditional probability of failure (or other relevant event)  in an infinitesimal time $\delta t$,  given survival to time $t$.

$h(t)= \lim_{\delta t\rightarrow 0} P(tt) =\frac{f(t)}{1-F(t)}=\frac{f(t)}{S(t)}$

where $f(t)$ denotes the probability density function of the random variable time to failure or event, $F(t)$ represents the corresponding cumulative distribution function and $S(t)$ denotes the survival function.

Noting, $f(t)= - S'(t)$

yields:

$\ln(S(t))=-\int _0^t h(s) ds$ or equivalently,

$S(t)=e^{-\int_0^t h(s) ds}$

I find it instructional to explore the effects of different hazard functions:

Constant hazard function:

$h(t)=\nu$.

This yields $S(t)= e^{-\nu t}\leftrightarrow F(t) = 1-e^{-\nu t}$, i.e. exponential distribution of time to failure.

Weibull distribution of time to failure or event

The Weibull probability density function ($f_W(t)$) is frequently used to model hazard function.

$f_W (t)= \frac{\alpha}{\beta}{(\frac{t}{\beta})}^{\alpha -1} e^{-{(\frac{t}{\beta})}^{\alpha}}$

This yields:

$h_W(t)= \frac{\alpha}{\beta}{(\frac{t}{\beta})}^{\alpha-1}$

or equivalently:

$\ln (h_W(t)) = \rho + \mu \ln (t)$

where

$\rho = \ln \alpha -\alpha\ln\beta$

$\mu = \alpha - 1$

$\alpha < 1$ yields a decreasing hazard function

$\alpha =1$ reduces to constant hazard

$\alpha > 1$ is an increasing hazard function

Bathtub hazard function

The bathtub function is so named for the shape of the function. It is commonly considered as a hazard function, i.e. decreasing hazard->constant hazard->increasing hazard.

A piecewise continuous linear function can be used, e.g.

$h(t)$

$= c_1 - c_0 t + \lambda$ $, 0\leq t \leq c_0/c_1$

$= \lambda$ $, c_1/c_0 < t \leq t_0$

$= c_2 (t-t_0) + \lambda$ $, t > t_0$

An alternative model is to mix Weibull hazard functions:

$h(t) = h_W(t, \alpha_1,\beta_1)+h_W(t,\alpha_2,\beta_2)$

where $\alpha_1<1$  and $\alpha_2>1$

Cox Proportional Hazard Model
Cox proportional hazard model assumes a hazard function of the form:
$\ln(h_i(t)) = \alpha (t) + \sum_{j=1}^n \beta_j x_{ij}$

The covariates are assumed to be independent of time. Baseline hazard function can be defined as:

$\ln (h_0(t)) =\alpha (t)$

Hazard ratio for  each unit covariate $k$, is

$\frac{h_k(t)}{h_0(t)}=e^{\beta_k}$

leading to the justification of proportional hazard.

If we let $S_0(t) =e^{-\int_0^t h_0(s) ds}$, then

$S(t)= e^{-e^{x^T\beta}\int_0^t h_0(s) ds}=S_0(t)^{e^{x^T\beta}}$