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

統計的因果推論勉強会 第2回

 統計的因果推論勉強会 第2回

経営学系統計学エンドユーザーのための,統計的因果推論勉強会の第2回です。ブログエントリーはこちらです。
http://hikaru1122.hatenadiary.jp/entry/2016/06/25/221339

Hikaru Goto

June 25, 2016
Tweet

More Decks by Hikaru Goto

Other Decks in Research

Transcript

  1. ੕໺ຊɹୈ2ষ • ൓࣮Ծ૝Ϟσϧʗજࡏ൓ԠϞ σϧ counterfactual model potential outcomes model •

    ΋͠΋ͷ͓࿩ɻ྆ํͱ΋஋͕ ଘࡏ͢Δ͸ͣɻͰ΋ɼ࣮ࡍ͸ Ұํ͔͠؍ଌ͞Εͳ͍ • ౷ܭతҼՌਪ࿦͸ܽଌͷσʔ λΛ෼ੳ͢Δ͜ͱ 12
  2. 21

  3. ී௨ʹtݕఆʢ༗ҙࠩͳ͠ʣ #ͱΓ͋͑ͣ܈ผͰฏۉΛݟͯΈΔɻ > by(dat[,"happy"], dat[,"promote"], mean) dat[, "promote"]: ঢਐͳ͠ [1]

    2.853333 ------------ dat[, "promote"]: ঢਐ͋Γ [1] 4.48 #tݕఆ > t.test(promote0$happy, promote1$happy) Welch Two Sample t-test data: promote0$happy and promote1$happy t = -2.2515, df = 6.6525, p-value = 0.06101 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -3.35328611 0.09995278 sample estimates: mean of x mean of y 2.853333 4.480000 23
  4. ܏޲είΞͰϚονϯά #܏޲είΞΛग़͢ɻ ps_score <- glm(promote ~ gender + commu +

    sales, family = binomial, data = dat2) #ϚονϯάʹඞཁͳσʔλΛऔΓग़͢ɻ dat$keikou.score <- ps_score$fitted.values keikou.score <- ps_score$fitted.values happy <- dat2$happy warituke <- dat2$promote #ϚονϯάͰ2܈ͷฏۉͷࠩΛݟΔɻ kekka <- Match(Y=happy, Tr=warituke, X=keikou.score, M=1) summary(kekka) • ATE Ͱ͸ͳ͘ ATT(TET) Ͱ͢ɻ 24
  5. ༗ҙͳ͕ࠩݟΒΕΔɻ > summary(kekka) Estimate... 2.2 AI SE...... 0.90173 T-stat..... 2.4398

    p.val...... 0.014697 Original number of observations.............. 20 Original number of treated obs............... 5 Matched number of observations............... 5 Matched number of observations (unweighted). 5 • ঢਐʹΑͬͯ޾෱౓͕ߴ·Δʢ΢ιʣ 25