# A tibble: 10 × 4
point x1 x2 GP
<chr> <dbl> <dbl> <chr>
1 M1 0 -12 A
2 M2 6 -10 A
3 M3 14 -6 C
4 M4 6 -2 C
5 M5 12 0 C
6 M6 -8 2 B
7 M7 2 4 C
8 M8 6 4 C
9 M9 10 10 C
10 M10 12 10 C
# A tibble: 10 × 9
point x1 x2 GP x1ave x2ave wt x1Gave x2Gave
<chr> <dbl> <dbl> <chr> <dbl> <dbl> <int> <dbl> <dbl>
1 M1 0 -12 A 6 0 2 3 -11
2 M2 6 -10 A 6 0 2 3 -11
3 M3 14 -6 C 6 0 7 8.86 2.86
4 M4 6 -2 C 6 0 7 8.86 2.86
5 M5 12 0 C 6 0 7 8.86 2.86
6 M6 -8 2 B 6 0 1 -8 2
7 M7 2 4 C 6 0 7 8.86 2.86
8 M8 6 4 C 6 0 7 8.86 2.86
9 M9 10 10 C 6 0 7 8.86 2.86
10 M10 12 10 C 6 0 7 8.86 2.86
3.2 射的データの基本配置を図示する(pbase)
library(ggrepel).d %>%ggplot(aes(x=x1,y=x2)) +geom_point() +coord_fixed(ratio =1) +geom_vline(xintercept =0) +geom_hline(yintercept =0) -> pp <- p +geom_text_repel(aes(x=x1,y=x2,label=point)) p <- p +geom_point(aes(x=x1ave,y=x2ave)) +annotate("text",x=.d$x1ave,y=.d$x2ave+0.6,label="G") p <- p +geom_point(aes(x=x1Gave ,y= x2Gave)) +geom_text(aes(x=x1Gave ,y= x2Gave+0.6,label=GP))pbase <- p
4 雲の分散を計算する
4.1 各点(M1〜M10)の平均点G(6.0)からの平方距離/まず、グラフ
4.2 Vtotal 雲全体の分散
p <- pbase +geom_segment(data = .d, aes(x = x1, y = x2, xend = x1ave, yend = x2ave),arrow =arrow(length =unit(0.1, "cm"), type ="closed"))p
差の寄与率 “contribution of deviation”、という概念がある(Le Roux&Rouanet 1998 )。 注目している部分集合(重み、平均点を持つ)が2つのとき、群間寄与(V_between)は、差の寄与率と等しくなるという。この差の寄与率、という考え方は、第3章にある、MCAが生成した変数空間の軸解釈に関係してそうなのだが、そこがイマイチわからない。
MCA2010=2021 では、pxx
7 参考文献
Robette N. (2023), GDAtools : Geometric Data Analysis in R, version 2.0, https://nicolas-robette.github.io/GDAtools/
Le Roux B., Rouanet H. (1998). Interpreting Axes in MCA: Method of the contributions of points and deviations, in Visualization of categorical data, ed. J. Blasius & M. Greenacre, Academic Press.