0

I'm not sure about the output of the MCA() function in the FactoMineR library in R.

For example I want 10 components, so I'm running the following code:

X1 <- MCA(data, ncp = 10)

Does ncp (which stands for number of dimensions) give me 10 components??

neilfws
  • 32,751
  • 5
  • 50
  • 63
HP_17
  • 203
  • 1
  • 4
  • 10
  • It gives you the number of components until 100% of cumulative variance is explained by them. It can be less than 10. – Duck Aug 07 '20 at 00:02
  • Thanks for your response. so what value should I put in NCP, (by default it is 5). My dataset has 21 fields and I ideally would want not more than 21 components. So is it safe to put NCP=21? – HP_17 Aug 07 '20 at 00:47

1 Answers1

0

npc is the argument in MCA that specifies the number of dimensions you want to store, so when you look at the results or the summary you can see the values (cos2, contrib, etc) for the variables.

Definition you can find by typing ?MCA in R:

  • ncp - Number of dimensions kept in the results (by default 5)