MCA error in xj[i] : only 0's may be mixed with negative subscripts

138 views
Skip to first unread message

Andrea Vidal Durà

unread,
Feb 10, 2016, 6:42:51 AM2/10/16
to FactoMineR users
Reading about the use of Multiple Correspondence Analysis, I've seen many examples with numeric data.

My data consist on:


Data:     8 objects, in rows (sites, labels in column A)

                11754 variables (OTUs) (columns)

Data are counts (abundance of the OTUs, number of reads of the correspondent OTU in the sample). There are none empty cells and any row or columns sum equals zero.



I tryed to run MCA in R after loading the package FactoMineR and I got every time the same error. 

> res.mca<-MCA(MCA_forR,ncp=5, ind.sup = NULL, quanti.sup = NULL, quali.sup = NULL, graph = TRUE, level.ventil = 0, axes = c(1,2), row.w = NULL, method = "Indicator", na.method = "NA", tab.disj = NULL)

error  in xj[i] : only 0's may be mixed with negative subscripts

I load as well the package missMDA to check missing data, but then I reaslised that it asks for categorical values. 

> estim_ncpMCA(MCA_forR, ncp.min=0, ncp.max=5, method.cv = "Kfold", nbsim=100, pNA=0.05, threshold=1e-4)

Error in estim_ncpMCA(MCA_forR, ncp.min = 0, ncp.max = 5, method.cv = "Kfold",  : 

All variables are not categorical, the following ones are numeric:  OTU_167


What can I do? there is some way to run a MCA with quantitative data?

Thanks

Andrea

josse

unread,
Feb 12, 2016, 3:30:09 AM2/12/16
to factomin...@googlegroups.com
Dear Andrea,
As you said, MCA is dedicated to categorical variables and not continous or counts,
Thus, for counts, you should for instance used CA for Correspondence Analysis,
Best regards,
Julie
--
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.

-- 
juliejosse.com
Reply all
Reply to author
Forward
0 new messages