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 |
|
m |
|
mu0 |
optional, initial means, should be a |
R0 |
optional, initial covariance matrices, should be a |
Value
object of class qbnmix
, i.e., list
of
$mu |
|
$R |
|
$alpha |
|
$w |
|
$mu0 |
|
$R0 |
|
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)