if (FALSE) {
if(require(mixtools)){
mixmdl1 <- mixtools::normalmixEM(faithful$waiting, k = 2)
}
plot_mm(mixmdl1, 2)
if(require(mixtools)){
x <- c(rgamma(200, shape = 50, scale = 11), rgamma(200, shape = 28, scale = 6))
mixmdl2 <- mixtools::gammamixEM(x, lambda = c(1, 1)/2)
}
plot_mm(mixmdl2)
}
Run the code above in your browser using DataLab