2016年2月7日日曜日

Metric 予測:2 グループ比較

t 分布でMCMC」からの続き。

ここまでの分析で、Smart Drug の効果の推定は IQ 平均との比較で行った。より実際的には、偽薬を投与したグループなどとの比較で効果を測る。

以下は図 16.11 の "dependency diagram for robust estimation of two groups" 。
t 分布のシミュレーションデータの yj は「j 番目のグループの i 番目のデータ」。t 分布のパラメータは、μj , σj がグループ毎、normality ν はグループで共通とする。

偽薬と Smat Drug の観測データの比較プロットは以下の通り。左のヒストグラムで上段が偽薬、下段が Smat Drug 。右の Boxplot で左からプラシーボ、Smat Drug 。プロットの描画スクリプは「SmartDrugIQ を高めるか?」を参照。 
以下は Stan-Ymet-Xnom2grp-MrobustHet-Example.R の実行結果、事後確率であるパラメータ推定値、各推定値の差、effect size,  posterior predictive check(図 16.12 に相当)。
difference of means7.14Smart Drug が上回った。95%HDI[1.26, 14.1] は、ROPE[-0.5, 0.5] を僅かに外しているが、「違いはある」とはいえる。ただし、この ROPE はかなり狭い(厳しい)設定。

effect size95%HDI[0.0897, 0.984] で僅かに 0 より大きいが、ROPE[-0.1, 0.1]±0.1 区間)に重なっている。つまり「effect size は無い」とするのが妥当。

normality ν の差 difference of scales では、95%HDI[1.35, 12.3]ROPE[-0.5, 0.5] を明確に外している。つまり、Smart Drug の効果による大きな偏差を示している。

図 16.12 右列 1, 2 行の、偽薬と Smart Drugposterior predictive check から、両方とも t 分布で観測データを上手く表せていることが見れる。


NHST の t 検定

同じデータを t 検定する。

> df <- read.csv(file="TwoGroupIQ.csv")
> t.test(Score ~ Group, data=df)

Welch Two Sample t-test

data:  Score by Group
t = -1.958, df = 111.44, p-value = 0.05273
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -15.70602585   0.09366161
sample estimates:
   mean in group Placebo mean in group Smart Drug 
                100.0351                 107.8413 

p 値が 0.05273 > 5% で、帰無仮説は棄却できない。これは、図 16.12difference of means の結論とは異なる(ROPE を広くしない限り)。

この結論の違いの原因は

The reason that the t test is less sensitive than the Bayesian estimation in this example is that the t test assumes normality and therefore its estimate of the within-group variances is too large when there are outliers.

簡潔にいえば、t test では「外れ値」に上手く対応できない、ということ。

0 件のコメント:

コメントを投稿