library(mclust) #septa.data is the data from the septa.data file in appendix A #costa.data is the data from the costa.data file in appendix A #wall.data is the data from the wall.data file in appendix A d<- c(1,2,4) septa.trunc<- septa.data[,d] septaFM<-Mclust(septa.trunc) wallFM<-Mclust(wall.data) costaFM<-Mclust(costa.data) plot(septaFM, data=septa.trunc) plot(wallFM, data=wall.data) plot(costaFM, data=costa.data) #the classification attribute contains the most likely component #the observation belongs to septaFM$classification wallFM$classification costaFM$classification #different models can be ran specifying the modelName and number of compoenets(G) #when running the Mclust function #type ?Mclust for more details #the loglik attribute contains the log likelihood of the selected model #the BIC is automatically calculated in the package "mclust", the AICc was #calculated in a spread sheet after exporting the log likelihoods. septaFM$loglik wallFM$loglik costaFM$loglik