![]() |
The FactoMineR is a powerful R package designed for multivariate data analysis including the Principal Component Analysis (PCA), Correspondence Analysis (CA), and Multiple Correspondence Analysis (MCA). One of the key features of FactoMineR is the ability to handle supplementary variables. This article will focus on how to handle supplementary qualitative variable labels in the FactoMineR. What are Supplementary Variables?The Supplementary variables also known as illustrative or passive variables are variables that do not contribute to the construction of the principal components in the analysis but are projected into the analysis space a posteriori. These variables can provide additional insights without influencing the primary results. Why Use Supplementary Variables?The Supplementary variables can help in interpreting the results of the analysis by providing additional context. They can also be used to verify the robustness of the analysis by checking how well they fit into the structure defined by the active variables. FactoMineR OverviewThe FactoMineR offers several functions for the multivariate analysis including:
For each of these functions, we can specify supplementary variables that will be included in the analysis without the influencing the primary structure. Let’s walk through an example of how to include the supplementary qualitative variables in an MCA using the FactoMineR using R Programming Language. Step 1. Install and Load FactoMineRFirst, ensure that FactoMineR is installed and loaded in the R environment.
Step 2. Prepare Your DataFor this example, we will use a sample dataset that includes both the active and supplementary qualitative variables.
Step 3. Perform MCA with Supplementary VariablesTo include supplementary variables in the MCA use the MCA() function and specify the supplementary variables.
Output: **Results of the Multiple Correspondence Analysis (MCA)**
The analysis was performed on 8 individuals, described by 4 variables
*The results are available in the following objects:
name description
1 "$eig" "eigenvalues"
2 "$var" "results for the variables"
3 "$var$coord" "coord. of the categories"
4 "$var$cos2" "cos2 for the categories"
5 "$var$contrib" "contributions of the categories"......................................................... Step 4. Visualize the ResultsThe FactoMineR integrates well with the factoextra package in which provides convenient functions for the visualizing multivariate analysis results.
Output: ![]() Supplementary Qualitative Variable Labels in FactoMinR 1. Visualize IndividualsTo visualize individuals with the supplementary variable, use:
Output: ![]() Supplementary Qualitative Variable Labels in FactoMinR b. Visualize VariablesTo visualize active variables and supplementary qualitative variables:
Output: ![]() Supplementary Qualitative Variable Labels in FactoMinR The biplot provides a simultaneous representation of both the individuals and variables in the MCA space. The Points closer together represent individuals or categories with the similar profiles. The Supplementary variables do not influence the construction of the MCA dimensions but are projected into the space defined by the active variables. They help to see how well the supplementary categories fit within existing structure. ConclusionUsing supplementary qualitative variable labels in the FactoMineR enhances the interpretability of the multivariate analysis by providing the additional context without the altering the primary structure. By following the steps outlined in this article, we can effectively incorporate and visualize supplementary qualitative variables in the analyses. Supplementary Qualitative Variable Labels in FactoMinR-FAQs1. What are the benefits of using supplementary variables?
2. Can I use both qualitative and quantitative supplementary variables in FactoMineR?
3. How do I interpret the positions of supplementary variables in the biplot?
4. What other analyses in FactoMineR support supplementary variables?
|
Reffered: https://www.geeksforgeeks.org
R Language |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 19 |