rcorrelationpcacategorical-data

Obtaining correlation tables of quanti and qualitative variables in the FactoMineR package


Using the FactoMineR package, I performed PCA on a biological dataset, where each column is a gene (n = 15) and rows are the different samples. There are a number of columns of categorical variables (columns 16 to 20, for example control/treatment and cancer/noncancer), which I included as qualitative supplements.

res.pca = FactoMineR::PCA(dataset, scale.unit=TRUE,
                          ncp=6,
                          quali.sup= c(16:20),
                          graph=FALSE)
  1. I want to know different ways of obtaining correlations between quantitative and qualitative variables and the PCA dimensions (e.g., res.pca$quali.sup$eta2),
  2. I want to know how FactoMineR calculated these correlations and,
  3. a brief explanation of the interpretation of the correlations. For example, this is the output after :

enter image description here


Solution

  • The correlation (squared) is computed between the coordinates of the samples (individuals in FactoMineR terms) and the categorical variable expressed as numeric factor levels.