Factor analysis of mixed data
In statistics, factor analysis of mixed data or factorial analysis of mixed data (FAMD, in the French original: AFDM or Analyse Factorielle de Données Mixtes), is the factorial method devoted to data tables in which a group of individuals is described both by quantitative and qualitative variables. It belongs to the exploratory methods developed by the French school called Analyse des données (data analysis) founded by Jean-Paul Benzécri. The term mixed refers to the use of both quantitative and qualitative variables. Roughly, we can say that FAMD works as a principal components analysis (PCA) for quantitative variables and as a multiple correspondence analysis (MCA) for qualitative variables.
Scope
When data include both types of variables but the active variables being homogeneous, PCA or MCA can be used.
Indeed, it is easy to include supplementary quantitative variables in MCA by the correlation coefficients between the variables and factors on individuals (a factor on individuals is the vector gathering the coordinates of individuals on a factorial axis); the representation obtained is a correlation circle (as in PCA).
Similarly, it is easy to include supplementary categorical variables in PCA.[1] For this, each category is represented by the center of gravity of the individuals who have it (as MCA).
When the active variables are mixed, the usual practice is to perform discretization on the quantitative variables (e.g. usually in surveys the age is transformed in age classes). Data thus obtained can be processed by MCA.
This practice reaches its limits:
- When there are few individuals ( less than a hundred to fix ideas ) in which case the MCA is unstable;
- When there are few qualitative variables with respect to quantitative variables (one can be reluctant to discretize twenty quantitative variables to take into account a single qualitative variable).
Criterion
The data include [math]\displaystyle{ K }[/math] quantitative variables [math]\displaystyle{ {k = 1,\dots, K} }[/math] and [math]\displaystyle{ Q }[/math] qualitative variables [math]\displaystyle{ {q = 1,\dots, Q} }[/math] .
[math]\displaystyle{ z }[/math] is a quantitative variable. We note:
- [math]\displaystyle{ r(z,k) }[/math] the correlation coefficient between variables [math]\displaystyle{ k }[/math] and [math]\displaystyle{ z }[/math] ;
- [math]\displaystyle{ \eta^2(z, q) }[/math] the squared correlation ratio between variables [math]\displaystyle{ z }[/math] and [math]\displaystyle{ q }[/math] .
In the PCA of [math]\displaystyle{ K }[/math], we look for the function on [math]\displaystyle{ I }[/math] (a function on [math]\displaystyle{ I }[/math] assigns a value to each individual, it is the case for initial variables and principal components) the most correlated to all [math]\displaystyle{ K }[/math] variables in the following sense:
- [math]\displaystyle{ \sum_k r^2(z,k) }[/math] maximum.
In MCA of Q, we look for the function on [math]\displaystyle{ I }[/math] more related to all [math]\displaystyle{ Q }[/math] variables in the following sense:
- [math]\displaystyle{ \sum_q\eta^2(z, q) }[/math] maximum.
In FAMD [math]\displaystyle{ \{K, Q\} }[/math], we look for the function on [math]\displaystyle{ I }[/math] the more related to all [math]\displaystyle{ K + Q }[/math] variables in the following sense:
- [math]\displaystyle{ \sum_k r^2(z, k) + \sum_q\eta^2(z, q) }[/math] maximum.
In this criterion, both types of variables play the same role. The contribution of each variable in this criterion is bounded by 1.
Plots
The representation of individuals is made directly from factors [math]\displaystyle{ I }[/math] .
The representation of quantitative variables is constructed as in PCA (correlation circle).
The representation of the categories of qualitative variables is as in MCA : a category is at the centroid of the individuals who possess it. Note that we take the exact centroid and not, as is customary in MCA, the centroid up to a coefficient dependent on the axis (in MCA this coefficient is equal to the inverse of the square root of the eigenvalue; it would be inadequate in FAMD).
The representation of variables is called relationship square. The coordinate of qualitative variable [math]\displaystyle{ j }[/math] along axis [math]\displaystyle{ s }[/math] is equal to squared correlation ratio between the variable [math]\displaystyle{ j }[/math] and the factor of rank [math]\displaystyle{ s }[/math] (denoted [math]\displaystyle{ \eta^2(j,s) }[/math]). The coordinates of quantitative variable [math]\displaystyle{ k }[/math] along axis [math]\displaystyle{ s }[/math] is equal to the squared correlation coefficient between the variable [math]\displaystyle{ k }[/math] and the factor of rank [math]\displaystyle{ s }[/math] (denoted [math]\displaystyle{ r^2(k,s) }[/math]).
Aids to interpretation
The relationship indicators between the initial variables are combined in a so-called relationship matrix that contains, at the intersection of row [math]\displaystyle{ l }[/math] and column [math]\displaystyle{ c }[/math]:
- If the variables [math]\displaystyle{ l }[/math] and [math]\displaystyle{ c }[/math] are quantitative, the squared correlation coefficient between the variables [math]\displaystyle{ l }[/math] and [math]\displaystyle{ c }[/math] ;
- If the variable [math]\displaystyle{ l }[/math] is qualitative and the variable [math]\displaystyle{ c }[/math] is quantitative, the squared correlation ratio between [math]\displaystyle{ l }[/math] and [math]\displaystyle{ c }[/math];
- If the variables [math]\displaystyle{ l }[/math] and [math]\displaystyle{ c }[/math] are qualitative, the indicator [math]\displaystyle{ \phi^2 }[/math] between the variables [math]\displaystyle{ l }[/math] and [math]\displaystyle{ c }[/math].
Example
A very small data set (Table 1) illustrates the operation and outputs of the FAMD . Six individuals are described by three quantitative variables and three qualitatives variables. Data were analyzed using the R package function FAMD FactoMineR .
|
|
In the relationship matrix, the coefficients are equal to [math]\displaystyle{ R^2 }[/math] (quantitative variables), [math]\displaystyle{ \phi^2 }[/math] (qualitative variables) or [math]\displaystyle{ \eta^2 }[/math] (one variable of each type).
The matrix shows an entanglement of the relationships between the two types of variables.
The representation of individuals (Figure 1) clearly shows three groups of individuals. The first axis opposes individuals 1 and 2 to all others. The second axis opposes individuals 3 and 4 to individuals 5 and 6.
The representation of variables (relationship square, Figure 2) shows that the first axis ([math]\displaystyle{ F1 }[/math]) is closely linked to variables [math]\displaystyle{ k_2 }[/math], [math]\displaystyle{ k_3 }[/math] and [math]\displaystyle{ Q_3 }[/math] . The correlation circle (Figure 3) specifies the sign of the correlation between [math]\displaystyle{ F1 }[/math], [math]\displaystyle{ k_2 }[/math] and [math]\displaystyle{ k_3 }[/math]; the representation of the categories (Figure 4) clarifies the nature of the relationship between [math]\displaystyle{ F1 }[/math] and [math]\displaystyle{ Q_3 }[/math]. Finally individuals 1 and 2, individualized by the first axis, are characterized by high values of [math]\displaystyle{ k_2 }[/math] and [math]\displaystyle{ k_3 }[/math] and by the categories [math]\displaystyle{ c }[/math] of [math]\displaystyle{ Q_3 }[/math] as well.
This example illustrates how the FAMD simultaneously analyses of quantitative and qualitative variables. Thus, it shows, in this example, a first dimension based on the two types of variables.
History
The FAMD's original work is due to Brigitte Escofier[2] and Gilbert Saporta.[3] This work was resumed in 2002 by Jérôme Pagès.[4] A more complete presentation of FAMD in English is included in a book of Jérôme Pagès.[5]
Software
The method is implemented in the R package FactoMineR. The method is implemented in the Python library prince.
References
- ↑ Escofier, Brigitte; Pagès, Jérôme (2016) (in fr). Analyses factorielles simples et multiples : cours et études de cas. Paris: Dunod. ISBN 978-2-10-074144-1. OCLC 951230297. https://www.dunod.com/sites/default/files/atoms/files/9782100741441/Feuilletage.pdf.
- ↑ Escofier Brigitte (1979). "Traitement simultané de variables quantitatives et qualitatives en analyse factorielle". Les cahiers de l'analyse des données 4 (2): 137–146. http://archive.numdam.org/ARCHIVE/CAD/CAD_1979__4_2/CAD_1979__4_2_137_0/CAD_1979__4_2_137_0.pdf.
- ↑ Saporta Gilbert (1990). Simultaneous analysis of qualitative and quantitative data. Atti della XXXV riunione scientifica; società italiana di Statistica, 63–72 . http://cedric.cnam.fr/~saporta/SAQQD.pdf
- ↑ Pagès Jérôme (2002). "Analyse factorielle de données mixtes". Revue de Statistique appliquée 52 (4): 93–111. http://archive.numdam.org/ARCHIVE/RSA/RSA_2004__52_4/RSA_2004__52_4_93_0/RSA_2004__52_4_93_0.pdf.
- ↑ Pagès, Jérôme (2015). Multiple factor analysis by example using R. Boca Raton: CRC Press. ISBN 978-1-4822-0547-3. OCLC 894169715.
Original source: https://en.wikipedia.org/wiki/Factor analysis of mixed data.
Read more |