How to extract Principal Components using FactoMineR package

梦想的初衷 提交于 2020-01-06 05:29:09

问题


I have a dataset with a mixture of categorical and numeric features. I have used the FAMD function from the FactoMineR package to perform Principal Component Analysis. However, I am unable to figure out a way to extract them into another dataframe, so that I can perform Principal Component Regression. I have attached an image of a subset my data.

#Performing Principal Component Analysis on Mixed Data
library(FactoMineR)
pca = FAMD(train[3:378],ncp=10)   

#Displaying the eigen value matrix
pca$eig

I have done the analysis so far. I need to be able to extract my principal components to a dataframe to perform Principal Component Regression. Any help would be appreciated.

来源:https://stackoverflow.com/questions/44319835/how-to-extract-principal-components-using-factominer-package

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!