# Chargement de FactoMineR library(FactoMineR) wine = read.table("data_MFA_WineJurys.csv", header=TRUE, sep=";", check.names=FALSE, row.names=1) # MFA without supplementary groups res <- MFA(wine[,2:58], group=c(27,15,15), type=rep("s",3), name.group=c("Expert","Student","Consumer")) # MFA with supplementary groups res <- MFA(wine, group=c(1,27,15,15,60), type=c("n",rep("s",4)), num.group.sup=c(1,5), name.group=c("Grade","Expert","Student","Consumer","Appreciation")) # A summary of the main results with the summary.MFA function summary(res) # The results are given on the first 2 dimensions summary(res, ncp=2) # Description of dimensions dimdesc(res) # Graph of the groups of variables plot(res,choix="group",cex=1.2) # Graph of the individuals plot(res, habillage=1) # Graph of the variables plot(res,choix="var", invisible="quanti.sup", title="Graph of the active variables") selection = c(grep("passion",rownames(res$quanti.var$coord),fixed=TRUE), grep("Acidity",rownames(res$quanti.var$coord),fixed=TRUE), grep("Sweetness",rownames(res$quanti.var$coord),fixed=TRUE)) plot(res,choix="var",select=selection,invisible="quanti.sup") plot(res,choix="var", invisible="quanti", habillage="none", lab.var=FALSE, title="Graph of the supplementary variables") # Graph with the partial points plot(res,choix="ind", partial="all", invisible="quali", title="Graph with the partial points") plot(res, cex=0.8, invisible="ind", partial="all", title="Graph of the individuals") # Graph of the partial axes plot(res,choix="axes") # Color the individuals according to a qualitative variable plot(res, cex=0.8, habillage=1)