library(vcdExtra)
library(ca)
data
data(Mental)
Mental.tab <- xtabs(Freq ~ mental+ses, data=Mental)
correspondence analysis
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.184940 0.362651 0.218072 0.234337
## ChiDist 0.260798 0.042750 0.071404 0.238669
## Inertia 0.012579 0.000663 0.001112 0.013349
## Dim. 1 -1.608804 -0.183408 0.088085 1.471537
## Dim. 2 0.325873 0.636852 -1.882247 0.508858
##
##
## Columns:
## 1 2 3 4 5 6
## Mass 0.157831 0.147590 0.172892 0.231325 0.159639 0.130723
## ChiDist 0.184023 0.187374 0.063947 0.044398 0.171358 0.294334
## Inertia 0.005345 0.005182 0.000707 0.000456 0.004688 0.011325
## Dim. 1 -1.121556 -1.146751 -0.365921 0.055088 1.025228 1.783327
## Dim. 2 -0.518293 -0.313039 -0.597693 1.133091 1.174196 -1.669326
plot(ca(Mental.tab))
