## BEANS: Statistical Models

Consider a scenario with three discrete covariates \(B_1,B_2,B_3\). Let \(Y\) denote the response. Let \(G\) denote a subgroup defined by the combination of \(B_1,B_2,B_3\).

### No subgroup effect

\begin{align*} Y|G=g &\sim N(\theta_g, \sigma^2) \\ \theta_g &\equiv \tau \\ \tau &\sim N(0, 1000) \\ \sigma^2 &\sim \mbox{Gamma}(0.001,0.001) \end{align*}

### Full stratification

\begin{align*} Y| G=g &\sim N(\theta_g, \sigma^2) \\ \theta_g &\sim N(0, 1000) \\ \sigma^2 &\sim \mbox{Gamma}(0.001,0.001) \end{align*}

### Simple regression

\begin{align*} Y|B_1,B_2,B_3 & \sim N(\theta_g,\sigma^2) \\ \theta_g &= \beta_0 + \beta_1 B_1 + \beta_2 B_2 + \beta_3 B_3 \\ \beta_k &\sim N(0,1000) \qquad k=1,\ldots,3\\ \sigma^2 &\sim \mbox{Gamma}(0.001,0.001) \end{align*}

### Simple shrinkage

\begin{align*} Y|B_1,B_2,B_3 & \sim N(\theta_g,\sigma^2) \\ \theta_g &= \tau + \gamma_1 B_1 + \gamma_2 B_2 + \gamma_3 B_3 + \psi_g$ \beta_k &\sim N(0,1000) \qquad k=1,\ldots,3\\ \sigma^2 &\sim \mbox{Gamma}(0.001,0.001) \end{align*}

### Regression and shrinkage

\begin{align*} &\theta_g = \tau + \gamma_1 B_1 + \gamma_2 B_2 + \gamma_3 B_3 + \psi_g \\ &\tau, \gamma_1,\gamma_2,\gamma_3 \sim N(0, 10^6)\\ &\psi_g \sim N(0, w^2)\\ &w \sim Half N(1) \end{align*}

### Dixson and Simon

\begin{align*} \theta_g &= \tau + \gamma_1 B_1 + \gamma_2 B_2 + \gamma_3 B_3 \\ \tau &\sim N(0, 10^6) \\ \gamma_k &\sim N(0, w^2)\\ w &\sim Half N(1) \end{align*}

### Extended Dixson and Simon

\begin{align*} \theta_g &= \tau + \gamma_1 B_1 + \gamma_2 B_2 + \gamma_3 B_3 + \delta_1 B_1B_2 + \delta_2 B_1 B_3 + \delta_3 B_2B_3 + \alpha B_1B_2B_3 \\ \tau &\sim N(0, 10^6) \\ \gamma_k &\sim N(0, w_1^2)\\ \delta_k &\sim N(0, w_2^2)\\ \alpha &\sim N(0,w_3^2) \\ w_l & \sim Half N(1) \end{align*}