Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 204798

Errors making predictions on MCA object FactoMineR

$
0
0

I'm trying to get new coordinates from an MCA analysis in R, using MCA from the FactoMineR package.

Where df is a dataframe,

res = MCA(df)
predict.MCA(res, df)

Produces an error :

Error in predict.MCA(res, df) : 
  The following categories are not in the active dataset: 0.01.12.13.11.22.21.30.01.12.13.11.22.23.21.32.33.30.01.12.13.11.22.23.21.30.01.12.13.11.22.23.21.32.33.30.01.12.13.11.22.23.21.32.33.30.015.1610.111.215.2610.211.315.3610.3

I'm unsure of how the categories can be different because it's the exact same dataframe (df) in both MCA and predict. (I did this just for debugging because I originally got this error while trying to convert my test set.)

I tried using droplevels for every column of the input dataframe, but I get the same error.

Any help appreciated.


Viewing all articles
Browse latest Browse all 204798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>