Erreur estim_ncpMCA --> dim(X) must have a positive length

161 views
Skip to first unread message

Emma Dieterlen

unread,
Jul 20, 2023, 5:55:20 AM7/20/23
to FactoMineR users
ENGLISH VERSION BELOW

Bonjour à tous, 

Je suis nouvelle sur le groupe. J'ai une erreur lorsque j'essaye de traiter les valeurs manquantes de mes données. 
 J'ai 29 variables et 387 observations dont des données manquantes et je souhaite faire une ACM.
27 variables qualitatives, toutes catégorielles dont certaines ordinales et 2 variables quantitatives dans mon data frame "data_MCA". 

Voilà ce qui apparait : 

nb <- estim_ncpMCA(data_MCA, quanti.sup = quanti )
Erreur dans apply(tabdisj[, (vec[i] + 1):vec[i + 1]], 1, which.max) :
  dim(X) doit avoir un longueur positive 

 complete <- imputeMCA(data_MCA, quanti.sup = quanti, ncp = 2)
Erreur dans apply(tabdisj[, (vec[i] + 1):vec[i + 1]], 1, which.max) :
  dim(X) doit avoir un longueur positive 

Pouvez vous m'aider ? 
Merci par avance, 
Emma

Hello everyone,

I'm new to the group. I have an error when I try to deal with missing values in my data.
 I have 29 variables and 387 observations including missing data and I want to do a MCA.
27 qualitative variables, all categorical, some ordinal, and 2 quantitative variables in my "data_MCA" data frame.

This is what appears:

nb <- estim_ncpMCA(data_MCA, quanti.sup = quanti )
Error in apply(tabdisj[, (vec[i] + 1):vec[i + 1]], 1, which.max) :
  dim(X) must have a positive length

 complete <- imputeMCA(data_MCA, quanti.sup = quanti, ncp = 2)
Error in apply(tabdisj[, (vec[i] + 1):vec[i + 1]], 1, which.max):
  dim(X) must have a positive length

Can you help me?
Thanks in advance,

Emma




Francois HUSSON

unread,
Sep 7, 2023, 4:59:05 AM9/7/23
to factominer-users
Check that :

- the first column is a variable and not a column with the name of the individuals,
- all the categories have at least 1 individuals
- the categorical variable are factors
- the continuous variables are considerer as supplementary.

FH


De: "Emma Dieterlen" <emdie...@gmail.com>
À: "FactoMineR users" <factomin...@googlegroups.com>
Envoyé: Jeudi 20 Juillet 2023 11:55:20
Objet: [SOCIAL]Erreur estim_ncpMCA --> dim(X) must have a positive length

--
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.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/factominer-users/695af47f-41cb-4caf-b083-8177c2dfa081n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages