## R code for constructing likelihood based confidence intervals for the hazard function

The following R code may be used for computing likelihood based confidence intervals for the hazard function of an Accelerated Failure Time model. The code computes the likelihood based confidence intervals for failure times that follow either a Weibull or lognormal distribution.

Definition of the hazard function
The hazard function (or hazard rate) at time t is given by: $h(t)=\frac{f(t)}{S(t)}$

where f(·) is the probability density function of the failure times, and S(·) the survival function. Continue reading R code for constructing likelihood based confidence intervals for the hazard function

## R code for constructing bootstrap confidence intervals for the hazard function

The following R code may be used for computing the hazard function (also known as the hazard rate) of the Accelerated Failure Time model. The code computes the hazard function for failure times that follow either a Weibull or lognormal distribution.

The code also computes normal-approximation and bootstrap confidence intervals for the hazard function. For calculating the latter confidence intervals the code employs the nonparametric bootstrap-t method. 