# Multilevel priors with interactions

Suppose I have the following model:

\begin{align} \text{wealth}[i] &\sim \text{Normal}(\mu[i], \sigma^2) \\ \mu[i] &= \alpha_{\text{gender}[i],\text{homeowner}[i]} + \beta_{\text{gender}[i],\text{homeowner}[i]} \cdot \text{age}[i] \end{align}

I want to allow the intercept and age effect to vary by gender and homeowner status. I also want (for example) the difference between male homeowners and male non-homeowners to be greater / lesser than the difference between female homeowners and female non-homeowners (i.e., they interact).

So, if they didn’t interact, I could have a model like:

\begin{align} \text{wealth}[i] &\sim \text{Normal}(\mu[i], \sigma^2) \\ \mu[i] &= \alpha_{\text{gender}[i]} + \alpha_{\text{homeowner}[i]} + (\beta_{\text{gender}[i]} + \beta_{\text{homeowner}[i]} )\cdot \text{age}[i] \\ (\alpha_{\text{gender}[i]}, \beta_{\text{gender}[i]})^T &= \text{MVN}([\bar{\alpha}_{\text{gender}}, \bar{\beta}_{\text{gender}}], \mathbf{\Sigma}) \\ \sigma_{\alpha_{\text{gender}}}, \sigma_{\beta_{\text{gender}}} &\sim \text{Exponential}(1) \\ \mathbf{\Omega} &\sim \text{LKJCorr}(2) \\ \mathbf{S} &= \begin{pmatrix}\sigma_{\alpha_{\text{gender}}} & 0 \\ 0 & \sigma_{\beta_{\text{gender}}} \end{pmatrix} \\ \mathbf{\Sigma} &= \mathbf{S} \mathbf{\Omega} \mathbf{S} \\ &\vdots \end{align}

But this would mean that the difference between homeowners and non-homeowners would be the same for males and females, not what I want.

So, my question is, how do I specify the model such allowing for the interaction, yet accounting for the fact that males are more similar to other males, females are more similar to other females, homeowners are more similar to other homeowners, and non-homeowners are more similar to other non-homeowners.

Thanks!

1 Like