A hierarchical regression model represents relationships across groups while sharing information between them. Group-specific parameters are sampled from common distributions, allowing the model to capture both group differences and similarities. section 6.3
The model structure contrasts three ways to handle grouped observations:
- A pooled model uses one parameter set for every observation and does not model group-specific variation. section 6.3
- An unpooled model assigns independent parameters to each group, preventing information sharing. section 6.3
- A hierarchical model samples group parameters from shared distributions, combining partial pooling with group-specific behavior. section 6.3
In Bayesian hierarchical regression, priors describe the higher-level distributions and group-level coefficients. For county c, an intercept αc and slope βc can be sampled from shared Gaussian distributions. Posterior distributions are then inferred with MCMC. section 6.3
County-level radon regression
A regression of house radon levels uses county membership and floor information, particularly whether a house has a basement. Each county receives its own intercept and slope while sharing higher-level distributions with other counties. section 6.3
Compare pooled, unpooled, and hierarchical graphical models to see how parameter sharing changes the regression structure. section 6.3
A practical implementation defines coefficient distributions and the data likelihood in PyMC, indexes observations by county, and runs inference with the no-U-turn sampler. section 6.3

