Warning in geom_bar(stat = "identity", fill = barfill, color = barcolor, :
Ignoring empty aesthetic: `width`.
#提取两个维度,维度1的贡献是86.8%, 维度2的贡献是13.0%.
2.3 绘制对应分析图
#2.3 绘制对应分析图CA(ex2)
**Results of the Correspondence Analysis (CA)**
The row variable has 5 categories; the column variable has 4 categories
The chi square of independence between the two variables is equal to 118.0959 (p-value = 1.48029e-19 ).
*The results are available in the following objects:
name description
1 "$eig" "eigenvalues"
2 "$col" "results for the columns"
3 "$col$coord" "coord. for the columns"
4 "$col$cos2" "cos2 for the columns"
5 "$col$contrib" "contributions of the columns"
6 "$row" "results for the rows"
7 "$row$coord" "coord. for the rows"
8 "$row$cos2" "cos2 for the rows"
9 "$row$contrib" "contributions of the rows"
10 "$call" "summary called parameters"
11 "$call$marge.col" "weights of the columns"
12 "$call$marge.row" "weights of the rows"
Dim 1 Dim 2 Dim 3
less than 10k 0.969960339 0.03003387 5.791844e-06
10k-30k 0.005022974 0.98842064 6.556387e-03
30k-50k 0.848488225 0.14144329 1.006848e-02
50k-100k 0.828708215 0.16984574 1.446041e-03
more than 100k 0.823408163 0.17415844 2.433397e-03
**Results of the Correspondence Analysis (CA)**
The row variable has 5 categories; the column variable has 4 categories
The chi square of independence between the two variables is equal to 118.0959 (p-value = 1.48029e-19 ).
*The results are available in the following objects:
name description
1 "$eig" "eigenvalues"
2 "$col" "results for the columns"
3 "$col$coord" "coord. for the columns"
4 "$col$cos2" "cos2 for the columns"
5 "$col$contrib" "contributions of the columns"
6 "$row" "results for the rows"
7 "$row$coord" "coord. for the rows"
8 "$row$cos2" "cos2 for the rows"
9 "$row$contrib" "contributions of the rows"
10 "$call" "summary called parameters"
11 "$call$marge.col" "weights of the columns"
12 "$call$marge.row" "weights of the rows"
American European Japanese
Married 38.513274 13.53982 49.946903
Married with Kids 41.911504 14.73451 54.353982
Single 41.911504 14.73451 54.353982
Single with Kids 5.663717 1.99115 7.345133
Warning in geom_bar(stat = "identity", fill = barfill, color = barcolor, :
Ignoring empty aesthetic: `width`.
#提取两个维度,维度1的贡献是92.8%, 维度2的贡献是7.2%.
3.3 绘制对应分析图
#2.3 绘制对应分析图CA(ex3)
**Results of the Correspondence Analysis (CA)**
The row variable has 4 categories; the column variable has 3 categories
The chi square of independence between the two variables is equal to 8.349475 (p-value = 0.2136014 ).
*The results are available in the following objects:
name description
1 "$eig" "eigenvalues"
2 "$col" "results for the columns"
3 "$col$coord" "coord. for the columns"
4 "$col$cos2" "cos2 for the columns"
5 "$col$contrib" "contributions of the columns"
6 "$row" "results for the rows"
7 "$row$coord" "coord. for the rows"
8 "$row$cos2" "cos2 for the rows"
9 "$row$contrib" "contributions of the rows"
10 "$call" "summary called parameters"
11 "$call$marge.col" "weights of the columns"
12 "$call$marge.row" "weights of the rows"
Dim 1 Dim 2
Married 0.812065457 0.187934543
Married with Kids 0.998972772 0.001027228
Single 0.998031174 0.001968826
Single with Kids 0.005440686 0.994559314
**Results of the Correspondence Analysis (CA)**
The row variable has 4 categories; the column variable has 3 categories
The chi square of independence between the two variables is equal to 8.349475 (p-value = 0.2136014 ).
*The results are available in the following objects:
name description
1 "$eig" "eigenvalues"
2 "$col" "results for the columns"
3 "$col$coord" "coord. for the columns"
4 "$col$cos2" "cos2 for the columns"
5 "$col$contrib" "contributions of the columns"
6 "$row" "results for the rows"
7 "$row$coord" "coord. for the rows"
8 "$row$cos2" "cos2 for the rows"
9 "$row$contrib" "contributions of the rows"
10 "$call" "summary called parameters"
11 "$call$marge.col" "weights of the columns"
12 "$call$marge.row" "weights of the rows"