Learn R Programming

rebmix (version 2.8.0)

REBMIX-methods: REBMIX Algorithm for Univariate or Multivariate Finite Mixture Estimation

Description

Returns as default the REBMIX algorithm output for mixtures of conditionally independent normal, lognormal, Weibull, gamma, binomial, Poisson or Dirac component densities. If model equals "REBMVNORM" output for mixtures of multivariate normal component densities with unrestricted variance-covariance matrices is returned.

Usage

## S3 method for class 'REBMIX':
REBMIX(model = "REBMIX", Dataset = list(), Preprocessing = character(), 
       cmax = 15, Criterion = "AIC", pdf = character(), theta1 = numeric(), 
       theta2 = numeric(), K = numeric(), y0 = numeric(), ymin = numeric(), 
       ymax = numeric(), ar = 0.1, Restraints = "loose", ...)
## ... and for other signatures
## S3 method for class 'REBMIX':
summary(object, ...)   
## ... and for other signatures

Arguments

model
see Methods section below.
Dataset
a list of data frames of size $n \times d$ containing d-dimensional datasets. Each of the $d$ columns represents one random variable. Number of observations $n$ equals the number of rows in the datasets.
Preprocessing
a character vector, giving the preprocessing types. One of "histogram", "Parzen window" or "k-nearest neighbour".
cmax
maximum number of components $c_{\mathrm{max}} > 0$. The default value is 15.
Criterion
a character vector giving the infromation criterion types. One of default Akaike "AIC", "AIC3", "AIC4" or "AICc", Bayesian "BIC", consistent Akaike "CAIC", Hannan-Quinn
pdf
a character vector of length $d$ containing continuous or discrete parametric family types. One of "normal", "lognormal", "Weibull", "gamma", "binomial", "Poisson" or "Dir
theta1
a vector of length $d$ containing initial component parameters. One of $n_{il} = \textrm{Number of categories} - 1$ for "binomial" distribution or "NA" otherwise.
theta2
a vector of length $d$ containing initial component parameters. Currently not used.
K
a vector or a list of vectors containing numbers of bins $v$ for the histogram and the Parzen window or numbers of nearest neighbours $k$ for the k-nearest neighbour. There is no genuine rule to identify $v$ or $k$. Consequently, the REBMIX alg
y0
a vector of length $d$ containing origins. The default value is numeric().
ymin
a vector of length $d$ containing minimum observations. The default value is numeric().
ymax
a vector of length $d$ containing maximum observations. The default value is numeric().
ar
acceleration rate $0 < a_{\mathrm{r}} \leq 1$. The default value is 0.1 and in most cases does not have to be altered.
Restraints
a character giving the restraints type. One of "rigid" or default "loose". The rigid restraints are obsolete and applicable for well separated components only.
object
see Methods section below.
...
currently not used; additional arguments affecting the summary produced.

Value

  • Returns an object of class REBMIX or REBMVNORM.

References

H. A. Sturges. The choice of a class interval. Journal of American Statistical Association, 21(153): 65-66, 1926. http://www.jstor.org/stable/2965501. M. Nagode and M. Fajdiga. A general multi-modal probability density function suitable for the rainflow ranges of stationary random processes. International Journal of Fatigue, 20(3):211-223, 1998. http://dx.doi.org/10.1016/S0142-1123(97)00106-0. M. Nagode and M. Fajdiga. An improved algorithm for parameter estimation suitable for mixed weibull distributions. International Journal of Fatigue, 22(1):75-80, 2000. http://dx.doi.org/10.1016/S0142-1123(99)00112-7. M. Nagode, J. Klemenc, and M. Fajdiga. Parametric modelling and scatter prediction of rainflow matrices. International Journal of Fatigue, 23(6):525-532, 2001. http://dx.doi.org/10.1016/S0142-1123(01)00007-X. M. Nagode and M. Fajdiga. An alternative perspective on the mixture estimation problem. Reliability Engineering & System Safety, 91(4):388-397, 2006. http://dx.doi.org/10.1016/j.ress.2005.02.005. M. Nagode and M. Fajdiga. The rebmix algorithm for the univariate finite mixture estimation. Communications in Statistics - Theory and Methods, 40(5):876-892, 2011a. http://dx.doi.org/10.1080/03610920903480890. M. Nagode and M. Fajdiga. The rebmix algorithm for the multivariate finite mixture estimation. Communications in Statistics - Theory and Methods, 40(11):2022-2034, 2011b. http://dx.doi.org/10.1080/03610921003725788. M. Nagode. Finite mixture modeling via REBMIX. Journal of Algorithms and Optimization, 3(2):14-28, 2015. http://www.academicpub.org/jao/paperInfo.aspx?PaperID=16625.

Examples

Run this code
# Generate and plot univariate normal dataset.

n <- c(998, 263, 1086, 487)

Theta <- list(pdf1 = "n",
  theta1.1 = c(688, 265, 30, 934),
  theta2.1 = c(72, 54, 34, 28))

normal <- RNGMIX(Dataset.name = "complex1",
  rseed = -1,
  n = n,
  Theta = Theta)
  
normal 

normal@Dataset[[1]][1:20,]  

# Estimate number of components, component weights and component parameters. 

K <- c(as.integer(1 + log2(sum(n))), # Minimum v follows Sturges rule.
  as.integer(2 * sum(n)^0.5)) # Maximum v follows RootN rule.

normalest <- REBMIX(Dataset = normal@Dataset, 
  Preprocessing = "h", 
  cmax = 8, 
  Criterion = "BIC", 
  pdf = "n", 
  K = K[1]:K[2])
                 
normalest

BIC(normalest)

logL(normalest)

# Plot finite mixture.

plot(normalest, nrow = 2, what = c("den", "dis"), npts = 1000)

Run the code above in your browser using DataLab