fitmixEM: Fits lifespan data of time units with gompertz,...

Description Usage Arguments Details Value References Examples

View source: R/fitmixEM.R

Description

Fits lifespan data of time units with gompertz, log-logistics, log-normal, and weibull mixture models choice of one.

Usage

1
fitmixEM(lifespan, model, K, initial = FALSE, starts)

Arguments

lifespan

numeric vector of lifespan dataset

model

model name of the one of the well-known model: gompertz,log-logistics,log-normal, and weibull.

K

number of well-known model components.

initial

logical true or false

starts

numeric if initial sets to true

Details

Estimates parameters of the given mixture model implementing the expectation maximization (EM) algorithm. General form for the cdf of a statistical mixture model is given by a distribution f is a mixture of K component distributions of f = (f_1, f_2,..f_K) if

f(x) = ∑_{k=1}^{K}λ_k f_k(x)

with λ_k > 0, ∑_k λ_k = 1. This equation is a stochastic model, thus it allows to generate new data points; first picks a distribution of choice, with probablities by weight, then generates another observation according to the chosen distribution. In short represenated by, Z ~ Mult(λ_1, λ_2,...λ_k) and X|Z ~ f_Z, where Z is a discrete random variable which component X is drawn from.

The families considered for the cdf of Gompertz, Log-normal, Log-logistic, and Weibull.

Value

1.The return has three values; the first value is estimate, measures, and cluster.

2. The second value includes four different measurements of goodness-of-fit tests involving: Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC), Kolmogorov-Smirnov (KS), and log-likelihood (log.likelihood) statistics.

3. The last value is the output of clustering vector.

References

Farewell, V. (1982). The Use of Mixture Models for the Analysis of Survival Data with Long-Term Survivors. Biometrics, 38(4), 1041-1046. doi:10.2307/2529885 McLachlan, G. J. and Peel, D. (2000) Finite Mixture Models, John Wiley \& Sons, Inc.

Essam K. Al-Hussaini, Gannat R. Al-Dayian & Samia A. Adham (2000) On finite mixture of two-component gompertz lifetime model, Journal of Statistical Computation and Simulation, 67:1, 20-67, DOI: 10.1080/00949650008812033

Examples

1
2
lifespan<-sample(1000)
fitmixEM(lifespan, "weibull", K = 2, initial = FALSE)

fitmix documentation built on April 19, 2021, 9:06 a.m.

Related to fitmixEM in fitmix...