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 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 three-parameter Weibull distribution

The following code fits the three-parameter Weibull distribution to (right) censored or complete (uncensored) data in R.

The R code implements a fitting strategy proposed by Jerry Lawless in his 2003 book Statistical models and methods for lifetime data (pp. 187-188). A similar strategy is suggested by Terry Therneau in this comment.

Weibull 3 parameter

Continue reading R code for fitting a three-parameter Weibull distribution

Extreme value analysis in engineering (largest extreme values)

Extreme value analysis deals with extreme events. In engineering, extreme value analysis is used to estimate the maximum wind speed (important for determining the maximum load on structures due to wind), the maximum river discharge or wave height (important information for the design height of dikes), maximum earthquake intensity (important input for structural mechanics), the maximum voltage level, et cetera.

The following code may be used for fitting extreme value models in R. Note, however, that the R code is restricted to the analysis of maxima (or largest values). For mimima (or smallest values) see this R code.

The code focuses on an application of extreme value analysis in the field of engineering, namely obtaining the maximum wind speed.

The code shows how to fit a Gumbel and Weibull distribution for largest values to the wind speed data. Subsequently, the same data will be fitted with a Generalized Extreme Value (or GEV) distribution for maxima. The three extreme value distributions for largest values (i.e., Gumbel, Weibull, and Fréchet distribution) are all family members of the GEV distribution. The code will demonstrate that a GEV model for largest values fits either the Gumbel, Weibull, or Fréchet distribution for maxima.

Continue reading Extreme value analysis in engineering (largest extreme values)