This method applies the expectation-maximization (EM) algorithm to estimate the parameters of a univariate Weibull mixture model. See 'Details'.
mixmod_em(x, ...) # S3 method for wt_reliability_data mixmod_em( x, distribution = "weibull", conf_level = 0.95, k = 2, method = "EM", n_iter = 100L, conv_limit = 1e-06, diff_loglik = 0.01, ... )
A tibble with class
Further arguments passed to or from other methods. Currently not used.
Confidence level for the intervals of the Weibull parameters
of every component
Number of mixture components.
Integer defining the maximum number of iterations.
Numeric value defining the convergence limit.
Numeric value defining the maximum difference between log-likelihood values, which seems permissible.
A list with classes
wt_mixmod_em. The length of the
list depends on the number of specified subgroups
k. The first
contain information provided by ml_estimation. The values of
bic are the results of a weighted log-likelihood, where the weights are
the posterior probabilities determined by the algorithm. The last list summarizes
further results of the EM algorithm and is therefore called
contains the following elements:
a_priori : A vector with estimated prior probabilities.
a_posteriori : A matrix with estimated posterior probabilities.
groups : Numeric vector specifying the group membership of every observation.
logL : The value of the complete log-likelihood.
aic : Akaike Information Criterion.
bic : Bayesian Information Criterion.
The EM algorithm is an iterative algorithm for which starting values must be defined. Starting values can be provided for the unknown parameter vector as well as for the posterior probabilities. This implementation employs initial values for the posterior probabilities. These are assigned randomly by using the Dirichlet distribution, the conjugate prior of a multinomial distribution (see Mr. Gelissen's blog post listed under references).
M-Step : On the basis of the initial posterior probabilities, the parameter vector is estimated with Newton-Raphson.
E-Step : The actual estimated parameter vector is used to perform an update of the posterior probabilities.
This procedure is repeated until the complete log-likelihood has converged.
Doganaksoy, N.; Hahn, G.; Meeker, W. Q., Reliability Analysis by Failure Mode, Quality Progress, 35(6), 47-52, 2002
Blog post by Stefan Gelissen: R code for fitting a mixture distribution to censored data ; last accessed on 8th December 2020
# Reliability data preparation: ## Data for mixture model: data_mix <- reliability_data( voltage, x = hours, status = status ) # Example 1 - EM algorithm with k = 2: mix_mod_em <- mixmod_em( x = data_mix, conf_level = 0.95, k = 2, n_iter = 150 ) # Example 2 - Maximum likelihood is applied when k = 1: mix_mod_em_2 <- mixmod_em( x = data_mix, conf_level = 0.95, k = 1, n_iter = 150 )