library(vcdExtra)
library(ca)
data(Mental)
Mental.tab <- xtabs(Freq ~ mental + ses, data = Mental)
ca(Mental.tab)
##
## Principal inertias (eigenvalues):
## 1 2 3
## Value 0.026025 0.001379 0.000298
## Percentage 93.95% 4.98% 1.08%
##
##
## Rows:
## Well Mild Moderate Impaired
## Mass 0.18494 0.362651 0.218072 0.23434
## ChiDist 0.26080 0.042750 0.071404 0.23867
## Inertia 0.01258 0.000663 0.001112 0.01335
## Dim. 1 -1.60880 -0.183408 0.088085 1.47154
## Dim. 2 0.32587 0.636852 -1.882247 0.50886
##
##
## Columns:
## 1 2 3 4 5 6
## Mass 0.157831 0.147590 0.172892 0.231325 0.159639 0.13072
## ChiDist 0.184023 0.187374 0.063947 0.044398 0.171358 0.29433
## Inertia 0.005345 0.005182 0.000707 0.000456 0.004688 0.01132
## Dim. 1 -1.121556 -1.146751 -0.365921 0.055088 1.025228 1.78333
## Dim. 2 -0.518293 -0.313039 -0.597693 1.133091 1.174196 -1.66933
plot(ca(Mental.tab))
title(xlab = "Dim 1", ylab = "Dim 2")