# NOT RUN {
n <- 250 ## create artificial data
set.seed(1)
y <- c(rnorm(n,-5), rnorm(n,0), rnorm(n,5))
yclass <- c(rep(1,n), rep(2,n), rep(3,n))
yModel <- Mclust(y)
mclust1Dplot(y, parameters = yModel$parameters, z = yModel$z,
what = "classification", main = TRUE)
mclust1Dplot(y, parameters = yModel$parameters, z = yModel$z,
truth = yclass, what = "errors", main = TRUE)
mclust1Dplot(y, parameters = yModel$parameters, z = yModel$z,
what = "density", main = TRUE)
mclust1Dplot(y, z = yModel$z, parameters = yModel$parameters,
what = "uncertainty", main = TRUE)
# }
Run the code above in your browser using DataLab