Upgrade to Pro — share decks privately, control downloads, hide ads and more …

多重比較/相関分析 / Multiple Comparison and Correlation...

多重比較/相関分析 / Multiple Comparison and Correlation Analysis

早稲田大学大学院経営管理研究科「企業データ分析」2024 冬の第11-12回で使用したスライドです。

Kenji Saito

January 18, 2025
Tweet

More Decks by Kenji Saito

Other Decks in Technology

Transcript

  1. Corporate data analysis — generated by Stable Diffusion XL v1.0

    2024 11-12 (WBS) 2024 11-12 — 2025-01-20 – p.1/29
  2. 1 12 2 • 2 12 2 (B A )

    • 3 12 9 • 4 12 9 • 5 12 16 • 6 12 16 t • 7 12 23 2 ( ) t • 8 12 23 2 ( ) t • 9 1 6 P • 10 1 6 • 11 1 20 • 12 1 20 • 13 1 27 14 1 27 W-IOI 2024 11-12 — 2025-01-20 – p.3/29
  3. ( 20 25 ) 1 (20 ) • 2 R

    ( 55 ) • 3 (32 ) • 4 (14 ) • 5 ( Git) (22 ) • 6 ( ) (24 ) • 7 (1) (25 ) • 8 (2) (25 ) • 9 R ( ) (1) — Welch (17 ) • 10 R ( ) (2) — (21 ) • 11 R ( ) (1) — (15 ) • 12 R ( ) (2) — (19 ) • 13 GPT-4 (19 ) • 14 GPT-4 (29 ) • 15 ( ) LaTeX Overleaf (40 ) • 8 (12/16 ) / (2 ) OK / 2024 11-12 — 2025-01-20 – p.4/29
  4. 2 2 t 1 9 P P 10 H0 HA

    k, N, ¯ ¯ x σ2 ( )MSwithin ( )MSbetween MStotal F F 2024 11-12 — 2025-01-20 – p.5/29
  5. 11 — 2 t FWER (Family-Wise Error Rate) Bonferroni (

    2 t ) / Tukey-Kramer q 12 / r sxy vs. 2024 11-12 — 2025-01-20 – p.6/29
  6. 5. (1) ( ) (2) 2025 1 16 ( )

    23:59 JST ( ) Waseda Moodle (Q & A ) (1)(2) Discord 2024 11-12 — 2025-01-20 – p.8/29
  7. . . . . . . 17 16 (1/17( )

    ) ( ) → 16 ( ) → 11 ( ) ( ) → 2 → 3 ← ( ) ( ^^;) ↑ 2024 11-12 — 2025-01-20 – p.9/29
  8. ( ) F = / ⇒ ( ) F =

    MSbetween MSwithin . . . [ ] . . . . . . [ ] ⇒ 2024 11-12 — 2025-01-20 – p.10/29
  9. O (1/n) 3 1. ∗ 40 4 * 2. ∗∗

    ** 3. 2024 11-12 — 2025-01-20 – p.11/29
  10. O (3/n) (n = 3) 1. 2. ( ) (

    -1 ) 3. F F = ( ) ( ) 4. F F F F F 5% F ⇒ →( ) → 2024 11-12 — 2025-01-20 – p.13/29
  11. H ⇒ (research question) . . . R 7.3 7.4

    7.5 1 2024 11-12 — 2025-01-20 – p.15/29
  12. p 95% : https://bellcurve.jp/statistics/course/9122.html n . . . µ 95%

    (1)( 6 ) p 95% (2) x − 1.96 × σ √ n ≤ µ ≤ x + 1.96 × σ √ n (1) ˆ p − 1.96 × ˆ p(1 − ˆ p) n ≤ p ≤ ˆ p + 1.96 × ˆ p(1 − ˆ p) n (2) B(n, p) n N(np, np(1 − p)) ˆ p N(p, p(1−p) n ) x N(µ, σ2 n ) 95% 95% 95% ( ) 2024 11-12 — 2025-01-20 – p.18/29
  13. F 2 ⇒ ( ). . . 2024 11-12 —

    2025-01-20 – p.19/29
  14. 11 — 2 t FWER (Family-Wise Error Rate) Bonferroni (

    2 t ) Tukey-Kramer q 2024 11-12 — 2025-01-20 – p.20/29
  15. (1/2) 2 t t α α . . . α

    (1 − α)m ( ) m 1 FWER ( t 1 α ) 5% Bonferroni ( 2 t ) αBonferroni = 0.05 m t 2024 11-12 — 2025-01-20 – p.21/29
  16. (2/2) Tukey-Kramer (1) : (2) : σ2 ( ) (H0

    ) µ1 = µ2 = · · · = µk µA = µB q qA−B = ¯ xA − ¯ xB √ MSwithin 1 2 ( 1 nA + 1 nB ) µA = µB q0.05 (k, dfwithin ) < |qA−B | 2024 11-12 — 2025-01-20 – p.22/29
  17. V ( p.248) 19 4 “ V.R” ( multcomp glht()

    ) (R TukeyHSD() ) p.243 “multcomp” 2024 11-12 — 2025-01-20 – p.23/29
  18. Pearson r ( sx sy x y ) r =

    sxy sx sy = n i=1 (xi − ¯ x)(yi − ¯ y) n i=1 (xi − ¯ x)2 n i=1 (yi − ¯ y)2 r −1 +1 |r| 1 ( ) sxy sxy = n i=1 (xi − ¯ x)(yi − ¯ y) n − 1 t ( df = n − 2 t ; ) t = r n − 2 1 − r2 2024 11-12 — 2025-01-20 – p.25/29
  19. X ( p.270) “ X.R” ( cor.test() ) p.270 (

    ) 2024 11-12 — 2025-01-20 – p.26/29
  20. 6. (1) ( ) (2) 2025 1 23 ( )

    23:59 JST ( ) Waseda Moodle (Q & A ) (1) Discord 2024 11-12 — 2025-01-20 – p.28/29