R code for constructing likelihood based confidence intervals for the regression coefficients of an Accelerated Failure Time model

The following R code computes likelihood based confidence intervals for the regression coefficients of an Accelerated Failure Time model. The AFT model is a parametric survival model.

AFT model coefficients

Continue reading R code for constructing likelihood based confidence intervals for the regression coefficients of an Accelerated Failure Time model

R code for constructing likelihood based confidence intervals for MTTF

The following R code may be used for constructing likelihood based intervals for the Mean Time To Failure (MTTF). These likelihood based intervals are also known as likelihood ratio bounds, or profile likelihood intervals.

The MTTF is defined as the mean of a failure-time distribution. The R code calculates the MTTF and its likelihood based confidence interval for the lognormal and Weibull failure-time distribution.

MTTF confidence interval

Continue reading R code for constructing likelihood based confidence intervals for MTTF

R code for constructing likelihood based confidence intervals for the cumulative probabilities and quantiles of an Accelerated Failure Time model

Failure times may be modeled as a function of explanatory variables. The Accelerated Failure Time model (AFT model) is often used for finding the relationship between failure times and explanatory variables.
In a reliability engineering context, for instance, an Accelerated Life Test is often used for determining the effect of variables (such as temperature or voltage) on the durability of some component. For relating the variables to the durability of the component, the reliability engineer usually employs an AFT model.
The following R code computes the likelihood based confidence intervals at specific values of the explanatory variables for 1) the cumulative probabilities, and 2) the quantiles. Note that a reliability engineer may refer to the cumulative probabilities as failure probabilities, and to the quantiles as life time quantiles.

AFT model quantiles and cumulative probabilities

Continue reading R code for constructing likelihood based confidence intervals for the cumulative probabilities and quantiles of an Accelerated Failure Time model

R code for constructing likelihood based confidence intervals for parametric survival models

The following R code may be used for constructing likelihood based intervals for parametric survival models (such as the Weibull model). These likelihood based intervals are also known as likelihood ratio bounds, or profile likelihood intervals.

The code constructs confidence intervals for the two distribution parameters of the parametric surival model (location μ and scale σ), life time quantiles tp, and failure probabilities F(te).

The R code focuses on the Weibull distribution, but can easily be adapted for modeling with other distributions (e.g., lognormal distribution).

Continue reading R code for constructing likelihood based confidence intervals for parametric survival models

R code for computing likelihood based confidence intervals for the predicted probabilities of a logistic regression model

The following R code may be used for constructing two-sided likelihood based intervals for the predicted probabilities of a logistic regression model. These likelihood based intervals are also referred to as likelihood ratio bounds, or profile likelihood intervals.

logistic regression predicted probability

Continue reading R code for computing likelihood based confidence intervals for the predicted probabilities of a logistic regression model