imputeMCA & MCA - error Error in 1:nrow(X) : argument of length 0

1,081 views
Skip to first unread message

Annemarie Verkerk

unread,
Jun 15, 2018, 3:58:46 PM6/15/18
to FactoMineR users
Dear all,

in the attached file, there are many NAs that I treat with imputeMCA:

tab.disj.comp <- imputeMCA(df, ncp = 1) (if someone can tell me why ncp should be 1 that would be great)

If I then use MCA:

mca1 <- MCA(df, tab.disj = tab.disj.comp, graph = TRUE)

I get a really general error message: Error in 1:nrow(X) : argument of length 0

Does anyone know what this means? 
Many thanks,
Annemarie
MCA_try.txt

François Husson

unread,
Jun 17, 2018, 4:26:43 AM6/17/18
to factomin...@googlegroups.com
Hi,
You need to use the tab.disj object:


tab.disj.comp <- imputeMCA(df, ncp = 1)
mca1 <- MCA(df, tab.disj = tab.disj.comp$tab.disj, graph = TRUE)

FH
--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "FactoMineR users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse factominer-use...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

--
Francois Husson
Department Statistics & Computer science
AGROCAMPUS OUEST
65 rue de St-Brieuc - 35042 RENNES
Tel: +33 2 23 48 58 86
http://www.agrocampus-ouest.fr/math/husson

Annemarie Verkerk

unread,
Jun 21, 2018, 2:46:47 PM6/21/18
to FactoMineR users
Dear prof. Husson, 

many thanks for the quick response and opologies for bothering the list with a typo! Hope it may help others though.

Best wishes,
Annemarie

Op zondag 17 juni 2018 10:26:43 UTC+2 schreef François Husson:
Reply all
Reply to author
Forward
0 new messages