Chapter 08.
Group Comparisons and Hierarchical Modeling
๋ณธ ํฌ์คํ ์ First Course in Bayesian Statistical Methods๋ฅผ ์ฐธ๊ณ ํ์๋ค.
Hierarchical Model์ ๊ทธ๋ฃน ๊ฐ ๊ทธ๋ฆฌ๊ณ ๊ทธ๋ฃน ๋ด variability๋ฅผ ์ค์ ํ๋ ๋ฐ์ ์ ์ฉํ๋ค.
Hierarchical Model describes both with-in group and between-group variability.
Hierarchical Model์ ๋ฒ ์ด์ฆ ํต๊ณ๊ฐ ๋ค๋ฅธ ์์ฉ๋ถ์ผ์ ๋๋ฆฌ ํผ์ ธ ์ฌ์ฉ๋๋ ๊ฒฐ์ ์ ๊ณ๊ธฐ๊ฐ ๋์๋ค. ๊ทธ๋ฆฌ๊ณ ์์ ๊ทธ๋ฆผ์ ํตํด์ ์ ์ ์๋ฏ์ด, ์ธต์ด ์ฌ๋ฌ ๊ฐ ์ด๊ธฐ ๋๋ฌธ์ ๋ณต์กํ ์ํฉ์์๋ Estimation์ ํ ์ ์๋ค๋ ์ฅ์ ์ด ์๋ค.
๊ฐ์ฅ ํฐ ํน์ง์ ๊ฐ๋จํ๊ฒ ์์ฝํด๋ณด์๋ฉด, ์ฌ๋ฌ ๊ทธ๋ฃน๋ผ๋ฆฌ ์๋ก ์ ๋ณด๋ฅผ ์ฃผ๊ณ ๋ฐ๋๋ค๋ ์ ์ด๋ค.
1. Exchangeability & De Finetti’s Theorem
์ด๋ถ๋ถ์ ๋ํด์๋ Chapter2์์ ์ด๋ฏธ ๋ค๋ฃฌ ์ ์ ์๋ค. ๊ทธ๋๋ ์ด๋ฒ ์ฑํฐ์ ๋
ผ๋ฆฌ์ ๊ฐ์ ๋ํด์ ์ ๋น์ฑ์ ๋ถ์ฌํด์ฃผ๊ธฐ ๋๋ฌธ์ ํ ๋ฒ ๋ ๋ณต์ตํด๋ณด๋๋ก ํ๊ฒ ๋ค. ์ฐ์ Exchangeability๋ ๋ค์๊ณผ ๊ฐ์ด ์ธ ์ ์๋ค.
$$p(y_1, ..., y_n) = p(y_{\pi_{1}}, ..., y_{\pi_{n}})$$
๊ทธ๋ฆฌ๊ณ De Finetti’s Theorem์ exchangeability๊ฐ ๋ง์กฑ๋๋ฉด, Conditional Independence๋ฅผ ๋ฐ๋ฅธ๋ค๋ ๊ฒ์ด์๋ค. (์ฐธ๊ณ ๋ก, ๊ทธ ์ญ์ ์๋ช
ํ๋ค.) ์ด๋ ์กฐ๊ฑด์ผ๋ก๋ small sample from large population์ด๋ผ๊ณ ํ๋ค. (์์ธํ ๊ฒ์ FCB๋ฅผ ์ฝ์ด๋ณด์.)
2. Hierarchical Beta-Binomial
2-1. Posterior ์ข ๋ฅ ์ ๋ฆฌ
Joint Posterior
$$\begin{align} p(\theta,\psi |y) &\propto p(y|\theta, \psi) \ p(\theta, \psi) \\ &= p(y|\theta) \ p(\theta, \psi) \\ &= p(y|\theta) \ p(\theta| \psi) \ p(\psi) \end{align}$$
Conditional Posterior
$$\begin{align} p(\theta | \psi, y) &\propto p(y, \psi|\theta) \ p(\theta) \\ &= p(y|\theta,\psi) \ p(\psi|\theta) \ p(\theta) \\ &= p(y|\theta) \ p(\theta, \psi) \\ &= p(y|\theta) \ p(\theta| \psi) \ p(\psi) \end{align}$$
Joint Posterior์ Conditional Posterior ๊ฐ๊ฐ์ ๋ง์ง๋ง๋ผ๋ฆฌ ๊ฐ๋ค๋ ์ฌ์ค์ ์ฃผ๋ชฉํด๋ณด์.
Marginal Posterior
$$p(\psi|y) = \int_\Theta p(\theta, \psi | y)d\theta \\ p(\psi|y) = \frac{p(\theta,\psi|y)}{p(\theta|\psi, y)}$$
๋ ์ค ํธํ ๊ฒ์ผ๋ก ๊ณ์ฐํ๋ค.
2-2. ๊ฐ๋จ ์ ๋ฆฌ
$$p(\theta, \alpha, \beta|y) \propto p(\alpha,\beta) \ \prod_{j=1}^{m}\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}\theta_j^{\alpha-1}(1-\theta_j)^{\beta-1} \ \prod_{j=1}^{m}\theta_j^{y_j}(1-\theta_j)^{n_j-y_j}$$
3์ธต: hyperprior $\psi$
2์ธต: $\theta_j|\psi \sim Beta(\alpha,\beta)$
1์ธต: $y_j|\theta_j \sim Binom(n_j, \theta_j)$
2-3. hyperprior๋ ์ด๋ป๊ฒ ์ฃผ์ด์ผ ํ ๊น?
๊ฒฐ๋ก ๋ถํฐ ๋งํ์๋ฉด,
$$p(\alpha, \beta) \propto (\alpha+\beta)^{-\frac{5}{2}}$$
์ด๋ ๊ฒ ์ค๋ค๊ณ ํ๋ค. ํด๋น ์์์ ๋ํ ๊ทธ๋ํ๋ ์๋์ ๊ฐ์๋ฐ, ์๊ฐ์ ์ผ๋ก uninformative์ ๊ฐ๊น๋ค๋ ๊ฒ์ ์ ์ ์๋ค.
์ด๋ ์๋๋ ์๋์ ๊ฐ์ ํํ์๋ค.
$$p\Big(log\frac{\alpha}{\beta}, (\alpha+\beta)^{-\frac{1}{2}}\Big) \propto 1$$
๋ณ์๋ณํ์ ํตํด ์ ๋ํ๋ ๊ณผ์ ์ ๋ณ์๋ณํ ํฌ์คํ
์ ์์ธํ๊ฒ ์ค๋ช
๋์ด ์๋ค. ๊ทธ๋์ ๊ฒฐ๋ก ์ ์ผ๋ก ์๋์ ๊ฐ์ด ์ธ ์ ์๋ค.
$$\rightarrow p(\theta, \alpha, \beta|y) \propto (\alpha+\beta)^{-\frac{5}{2}} \ \prod_{j=1}^{m}\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}\theta_j^{\alpha-1}(1-\theta_j)^{\beta-1} \ \prod_{j=1}^{m}\theta_j^{y_j}(1-\theta_j)^{n_j-y_j}$$
2-4. ์์
FCB ์ฑ
์ ๋์จ ์ข
์ ์ฅ(Rat Tumor) ์์๋ฅผ ์ดํด๋ณด์.
1) 95% Posterior interval
|
|

2) Marginal Distribution of alpha & beta
|
|

|
|
## `summarise()` ungrouping output (override with `.groups` argument)
|
|
## `summarise()` ungrouping output (override with `.groups` argument)
|
|

3) 95% posterior interval, uninformative prior($\alpha, \beta$)
|
|

4) 1๊ณผ 3 ๋น๊ตํด๋ณด๊ธฐ

3. Hierarchical Normal
Conclusion
Prior์ Prior, HyperPrior๋ฅผ ํ์ฉํ์ฌ ๋ณด๋ค ์ค๋๋ ฅ ์๋ ๋ชจ๋ธ์ ๋ง๋ค์ด๋ณด์!
Reference
[1] FCB
[2] ESC 2021-1 Spring ์ธ์
ํน์ ๊ถ๊ธํ ์ ์ด๋ ์๋ชป๋ ๋ด์ฉ์ด ์๋ค๋ฉด, ๋๊ธ๋ก ์๋ ค์ฃผ์๋ฉด ์ ๊ทน ๋ฐ์ํ๋๋ก ํ๊ฒ ์ต๋๋ค.