Adding HDI values in hierarchical model

Hello,

Does it make sense to add HDI values of fixed and random effects in a hierarchical model? To make the question more concrete, suppose I want to say that in general, there is no relation between age and income but only in one neighborhood there is a positive relation:

Income ~ Intercept + (beta + gamma[neighborhood]) * Age

Where beta is fixed effect and I have one gamma value for each neighborhood. Let’s say beta is low but one neighborhood has a high value of gamma. I run the sampler, get the HDIs. Since gamma values are nested in beta, would it make sense to add the HDI values of beta and gamma? How can I assess the total effect of that one neighborhood? I hope the question is clear but if not, please ask questions for me to clarify.

Thanks for the amazing work and I’d appreciate any feedback!

Is there a reason you need to sum the HDIs rather than adding the individual samples of beta and gamma[neighborhood] and then deriving HDIs of that sum?

2 Likes

Thanks! Great recommendation, I’ll implement this.

1 Like