Interpretation of PCA/FAMD results

I wrote a code about a mix PCA (FAMD - factor analysis of mixed data), where I have a dataset with some categorical variable and some numerical variable. This is my example code in R: library(dplyr) library(PCAmixdata) data <- starwars db_quali <- as.data.frame(starwars[,4:6]) db_quanti <- as.data.frame(starwars[,2:3]) pca_table <- PCAmix(X.quanti = db_quanti, X.quali = db_quali, rename.level=TRUE, graph = TRUE) Gender <- factor(data$gender) par(xpd=TRUE,mar=rep(8,4)) plot(pca_table ,choice="ind",label=FALSE, posleg=xy.coords(2,-10), main="Observations", coloring.ind = Gender) and the output graph is: How this method calculate the coordinate …
Category: Data Science

How to plot a PCA table

I'm studying PCA method with the package PCAmixdata because I have a dataset with numerical and categorical variable. This is my example code in R: library(dplyr) library(PCAmixdata) data <- starwars db_quali <- as.data.frame(starwars[,4:6]) db_quanti <- as.data.frame(starwars[,2:3]) pca_table <- PCAmix(X.quanti = db_quanti, X.quali = db_quali, rename.level=TRUE, graph = TRUE) Gender <- factor(data$gender) par(xpd=TRUE,mar=rep(8,4)) plot(pca_table ,choice="ind",label=FALSE, posleg=xy.coords(2,-10), main="Observations", coloring.ind = Gender) I know that the function ggplot can be used only with data.frame and at the moment I have a list. Is …
Category: Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.