0

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.

Subset of Data

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

#Displaying the eigen value matrix
pca$eig

Subset of eigen value matrix

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.

Adam Quek
  • 6,973
  • 1
  • 17
  • 23
Sisir
  • 1
  • 3
  • `pca$var$coord` – Adam Quek Jun 02 '17 at 02:35
  • Check `?FAMD` under "Value" for a list of objects that are returned in your factor-analysis object – Adam Quek Jun 02 '17 at 02:36
  • @AdamQuek Thanks for the insights Adam. But, I need the loadings of the variables. The objects under FAMD just have matrices of contributions, square cosine coordinates, etc. I don't understand what those are. – Sisir Jun 02 '17 at 03:10
  • Refer the [FAQ](http://factominer.free.fr/faq/index.html) then. The other analysis objects within `FactoMineR` are pretty similar to the `PCA` object. – Adam Quek Jun 02 '17 at 03:12

0 Answers0