Confidence ellipses around categories

The plotellipses() function draws confidence ellipses around the categories of several categorical variables.

Objectives

The objective is to see whether the categories of a categorical variable are significantly different from each other.

We are going to use the data set "tea" and draw confidence ellipses for four categorical variables: "where", "price", "sex" and "age_Q".

plotellipses

First load the package and the data set by typing: library(FactoMineR)
data(tea)

Then perform an MCA: res.mca = MCA(tea, quanti.sup=19, quali.sup=c(20:36))

Then launch the plotellipses() function: plotellipses(res.mca,keepvar=c("where","price","sex","age_Q")) #res.mca: an object of class MCA
#keepvar: a boolean or numeric vector of indexes of variables or a character vector of names of variables

Confidence ellipses around categories Click to view

Categories of "sex" and "where" are significantly different from each other.
For "age_Q" variable, the category "15-24" is significantly different from the others and other categories are not significantly different from each other.
For "price" variable, "p_upscale" and "p_variable" are significantly different from the others and from each other whereas other categories are not significantly different from each other.