0

The following code works fine for clustering categorical data using a model-based approach

dat <- read_xlsx("C:/CLU/mydata.xlsx")

dat$studies <- as.factor(dat$studies)
dat$Age <- as.factor(dat$Age)
dat$CAT <- as.factor(dat$CAT)
dat$DIV <- as.factor(dat$DIV)
dat$FLEX <- as.factor(dat$FLEX)
dat$INH <- as.factor(dat$INH)
dat$MEN <- as.factor(dat$MEN)
dat$PLA <- as.factor(dat$PLA)

dat <- data.frame(dat$id, dat$studies, dat$Age, dat$CAT, dat$DIV, dat$FLEX,
                  dat$INH, dat$MEN, dat$PLA)

#Model-based 
install.packages("Rmixmod")
library(Rmixmod)
out_mix <- mixmodCluster(dat, nbCluster=2)
summary(out_mix)

Here is mydata http://www.mediafire.com/file/03w2e335biz826h/mydata.xlsx/file

Now I'm trying to plot the Silhouette

I found this similar problem Silhouette plot in R but for model-based I cannot find out how to work it with the results I have in summary(out_mix)

It can be possible because they show the Silhouette plots here in a very similar case http://amsdottorato.unibo.it/4302/1/Dissertation_Anderlucci.pdf

But cannot figure out how..

Ana
  • 149
  • 3
  • 12

1 Answers1

0

I found a proposed solution here https://support.bioconductor.org/p/106627/

Ana
  • 149
  • 3
  • 12