0

I hope you will be able to help me. I would like to do MCA of a data frame with one dependent categorical variable (construction) and 9 binary (dichotomous) predictors. Here come the data.

CONSTRUCTION<-c("in plaats van", "ten opzichte van", "met behulp van", "ten koste van", "op grond van", "onder leiding van", "in tegenstelling tot", "op basis van")
IDIOSYNC<-c("no", "yes", "yes", "yes", "no", "no", "no", "no")
ARTICLE<-c("yes", "no", "no", "no", "no", "no", "no", "no")
PLURAL<-c("no", "no", "no", "no", "no", "no", "no", "no")
MODIF<-c("no", "no", "no", "no", "no", "yes", "yes", "no")
EXTRAPOS<-c("yes", "no", "no", "yes", "no", "yes", "yes", "no")
COMPLEM<-c("no", "no", "no", "no", "no", "yes", "no", "no")
P2OPTION<-c("no", "no", "no", "no", "no", "yes", "no", "no")
P1CHBL<-c("no", "no", "no", "no", "no", "no", "no", "no")
P2CHBL<-c("no", "no", "no", "no", "no", "no", "yes", "no")

data.comp.prep<-cbind(CONSTRUCTION, IDIOSYNC, ARTICLE, PLURAL, MODIF, EXTRAPOS, COMPLEM, P2OPTION, P1CHBL, P2CHBL)

ca.comp.prep<-MCA(data.comp.prep[, -1], graph=FALSE)
plot(ca.comp.prep, cex=0.7, col.var="black", col.ind="grey")

No problem till now, but when I want to look at the description of the dimensions, the following appears:

dimdesc(ca.comp.prep)
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : 
  contrasts can be applied only to factors with 2 or more levels

The points are mapped onto the bidimensional plot, but I can't look at the description of the values for each dimension. What's wrong with this?

I thank you in advance.

CBechet
  • 171
  • 2
  • 13

1 Answers1

0

The problem is that you have two variables (PLURAL and P1CHBL) that have only one value. There is no point in adding them to the MCA... And it prevents you from using dimdesc. I suggest you remove them from the analysis:

ca.comp.prep <- MCA(data.comp.prep[, -c(1,3,9)], graph=FALSE)
dimdesc(ca.comp.prep)
scoa
  • 19,359
  • 5
  • 65
  • 80