R code for fitting a finite mixture model to fatigue data

The following R code fits a Finite Mixture Fatigue Limit Model to fatigue data. The fatigue data may contain right, left, and interval censored observations. These censored observations are also referred to as runouts.

The Finite Mixture Fatigue Limit Model is fitted by using the Expectation-Maximization (EM) algorithm. The fitted model assumes that the fatigue observations follow either a Weibull, lognormal, or Gaussian distribution.

fatigue limit model mixture

Continue reading R code for fitting a finite mixture model to fatigue data

R code for a Fatigue-Limit Model

The following R code implements a fatigue-limit model. Details of the implemented fatigue-limit model can be found in this 1997 paper by Pascual and Meeker, and in Meeker and Escobar’s 1998 book Statistical Methods for Reliability Data (pp. 593-597).

The implemented model assumes that the fatigue-limit is fixed (i.e., identical fatigue-limit for all specimens). But in some practical cases it may be more realistic to assume that the fatigue-limits of individual specimens are considerably different. Under such circumstances a random fatigue-limit model should be used, which allows for a different fatigue-limit for each specimen. A random fatigue-limit model is described by Pascual and Meeker in this 1998 paper. However, the implemented fixed fatigue-limit model can still be applied when the differences in individual fatigue limits between specimens are small.

Continue reading R code for a Fatigue-Limit Model

R code for fitting a Finite Mixture Model to survival data

The following R code fits a Finite Mixture Model to survival (or reliability) data. The survival/reliability data may contain (right / interval) censored observations. However, it is also possible to fit the Finite Mixture Model to complete (uncensored) survival/reliability data.

The Finite Mixture Model is fitted by using the Expectation-Maximization (EM) algorithm. The fitted model assumes that the lifetime observations follow either a Weibull, lognormal, or Gaussian distribution.

Continue reading R code for fitting a Finite Mixture Model to survival data

R code for fitting a mixture distribution to censored data

The following code fits a mixture distribution to (right / interval) censored or complete (uncensored) data in R. The mixture distribution is fitted by using the Expectation-Maximization (EM) algorithm.

The R code demonstrates how to fit (1) a mixture of Weibull distributions, (2) a mixture of lognormal distributions, and (3) a mixture of Gaussian distributions.

finite mixture model censored data

Continue reading R code for fitting a mixture distribution to censored data

R code for fitting a 3-parameter lognormal model using the correct likelihood

When fitting a three-parameter lognormal model the likelihood may approach infinity (see figure below). This unboundedness of the likelihood occurs when the threshold parameter of the three-parameter lognormal model approaches the smallest observed failure time. A possible remedy, such that the likelihood becomes bounded again, is using the correct likelihood.
For some data sets it is necessary to resort to a remedy such as the correct likelihood. This is because the unboundedness of the likelihood might prevent a numerical optimization algorithm from finding the correct model parameters.

Lognormal 3 parameter correct likelihood

Example of an unbounded likelihood: The likelihood goes to infinity when the threshold parameter (=gamma) approaches the smallest failure time (marked by red line).

The following R code implements the correct likelihood for a 3-parameter lognormal distribution. The code may be used to fit the distribution to (right) censored or complete (uncensored) data in R.

Continue reading R code for fitting a 3-parameter lognormal model using the correct likelihood