The problem is the due to the fact that in correspondance analysis with a conteingency table of size I x J
the number of factorial axes is min{(I-1), (J-1)}
.
You have a 4 x 2
table so you can't have factorial plan but an axe (because dim = 1 = min(4-1, 2-1)
).
One way to solve this problem is to use CA with the parameter graph
set to FALSE
.
require(FactoMineR)
data <- matrix(c(185, 213, 98, 56, 28, 27, 5, 8),
ncol = 2, byrow = TRUE)
dimnames(data) <- list(c("ms", "plfm", "plfs", "tlj"),
c("cs", "ncs"))
data <- as.table(data)
res <- CA(data, graph = FALSE)
You can also check the coordinates to see that plotting a plan here is not possible.
res$row$coord
## ms plfm plfs tlj
## -0.0897234 0.2534199 -0.0011732 -0.2501709
res$col$coord
## [,1]
## cs 0.1469
## ncs -0.1527