qbnmix {dynmix}R Documentation

Estimates Normal Mixtures.

Description

This function performs a recursive clustering for normal mixtures. Quasi-Bayesian approximation is performed.

Usage

qbnmix(y,m=2,mu0=NULL,R0=NULL)

Arguments

y

matrix of observations, rows correspond to observations, columns correspond to tuples

m

numeric specifying the number of components (clusters), by default m=2 is taken

mu0

optional, initial means, should be a list of m matrices, each of them having one row and ncol(y) columns, if not specified random values are taken

R0

optional, initial covariance matrices, should be a list of m matrices, each of them having ncol(y) rows and ncol(y) columns, if not specified identity matrices are taken

Value

object of class qbnmix, i.e., list of

$mu

list of estimated means

$R

list of estimated covariance matrices (from last step only)

$alpha

matrix of estimates of mixing weights (components columnwise)

$w

matrix of posterior probabilities (components columnwise)

$mu0

list of initial means matrices

$R0

list of initial covaraince matrices

Source

Karny, M., Kadlec, J., Sutanto, E.L., 1998, Quasi-Bayes estimation applied to normal mixture, Preprints of The 3rd European IEEE Workshop on Computer-Intensive Methods in Control and Data Processing, Rojicek, J., Valeckova, M., Karny, M., Warwick K. (eds.), UTIA AV CR, 77–82.

Examples

R <- list(matrix(c(1,0.3,0,
                   0.3,0.3,0,
                   0,0,0.15),3,3),
          matrix(c(1,0,0,
                   0,0.5,0,
                   0,0,0.2),3,3))
data <- rbind(MASS::mvrnorm(n=180,c(5,2,3),R[[1]]),
              MASS::mvrnorm(n=20,c(1,2,3),R[[2]]))
data <- data[sample(nrow(data)),]
                  
mu0 <- list(matrix(c(4.8689,1.9417,3.0175),nrow=1,ncol=3),
            matrix(c(1.0182,1.9903,2.8847),nrow=1,ncol=3))     
est <- qbnmix(y=data,mu0=mu0)

[Package dynmix version 2.0 Index]