plot.qbnmix | R Documentation |
qbnmix
Object.The function plots selected outcomes from qbnmix
object.
## S3 method for class 'qbnmix'
plot(x, ...)
x |
an object of |
... |
not used |
The function plots a few outcomes from qbnmix
object. First, it plots means for each cluster. Then, it plots posterior probabilities for each cluster. Finally, estimates of mixing weights for each cluster.
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)
plot(est)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.