Tutorials › Biostatistics › Bayesian Hierarchical Models in Clinical Research

Bayesian Methods

Bayesian Hierarchical Models in Clinical Research

A practical and mathematical guide to hierarchical Bayesian models, including partial pooling, exchangeability, between-study heterogeneity, multi-center trials, subgroup analyses, repeated measures, historical borrowing, posterior prediction, prior specification, and clinical applications.

Advanced 25 min read

What You'll Learn

  • Why hierarchical models are useful for multi-center and multi-level clinical data
  • How complete pooling, no pooling, and partial pooling differ
  • How exchangeability and between-group heterogeneity are represented mathematically
  • How partial pooling produces shrinkage toward a population-level mean
  • How hierarchical models can borrow information across studies, centers, and subgroups
  • How to build, diagnose, and interpret hierarchical Bayesian models in clinical research

Introduction

Clinical research frequently produces data that are naturally organized into groups, levels, or clusters.

Patients may be treated at different clinical centers. Patients may belong to different geographic regions. Multiple clinical trials may evaluate related treatments. Repeated observations may be collected from the same patient. Subgroups may have related but non-identical treatment effects.

These structures create statistical dependence and information-sharing opportunities that are not adequately represented by treating every observation as completely independent.

A hierarchical model, also called a multilevel model, explicitly represents these levels of variation.

A Bayesian hierarchical model goes one step further by placing probability distributions on parameters at different levels of the hierarchy.

Key idea: A Bayesian hierarchical model allows related groups to have their own parameters while simultaneously modeling how those parameters are related through a population-level distribution. This produces partial pooling: groups learn from one another without being forced to have identical effects.

Why Hierarchical Models Matter in Clinical Research

Consider a randomized clinical trial conducted at 20 hospitals.

The treatment effect may differ somewhat from hospital to hospital because of differences in:

  • Patient characteristics
  • Clinical practice
  • Patient recruitment
  • Background therapy
  • Investigator experience
  • Measurement procedures
  • Chance variation

Let:

$$ \theta_j = \text{treatment effect in center }j $$

A model that assumes one identical treatment effect for every center is a complete-pooling approach.

At the opposite extreme, estimating every center effect completely independently is a no-pooling approach.

A hierarchical model provides a middle ground.

$$ \theta_j \sim N(\mu,\tau^2) $$

Each center has its own treatment effect \(\theta_j\), but those effects are modeled as arising from a common population distribution with mean \(\mu\) and between-center standard deviation \(\tau\).

The Three Pooling Strategies

The distinction between complete pooling, no pooling, and partial pooling is fundamental to understanding hierarchical models.

Approach Modeling Strategy Information Sharing
Complete pooling One common parameter for all groups Maximum
No pooling Separate parameter for every group None
Partial pooling Group-specific parameters drawn from a common distribution Intermediate

Complete Pooling

Suppose there are \(J\) clinical centers. A complete-pooling model assumes:

$$ \theta_1=\theta_2=\cdots=\theta_J=\mu $$

There is only one treatment-effect parameter.

This is statistically efficient if the treatment effect really is identical across centers.

However, it does not allow genuine between-center heterogeneity.

No Pooling

At the other extreme, each center can receive its own independent parameter:

$$ \theta_1,\theta_2,\ldots,\theta_J $$

Each effect is estimated using only the observations from that center.

This allows maximum heterogeneity but can produce unstable estimates when some centers have small sample sizes.

The problem with no pooling: A center with only a few patients may appear to have an extremely large or small treatment effect simply because of random variation.

Partial Pooling

A hierarchical model allows center-specific effects while connecting them through a common distribution:

$$ \theta_j \sim N(\mu,\tau^2) $$

Here:

  • \(\theta_j\) is the effect for center \(j\).
  • \(\mu\) is the overall mean effect.
  • \(\tau\) is the between-center standard deviation.

The center-specific effects are neither completely identical nor completely independent.

They are allowed to differ, but the model learns how much variation among them is supported by the data.

The Hierarchical Structure

A simple hierarchical model has two levels.

At the patient level:

$$ Y_{ij} \sim p(Y\mid\theta_j) $$

where \(Y_{ij}\) is the outcome for patient \(i\) in group \(j\).

At the group level:

$$ \theta_j \sim N(\mu,\tau^2) $$

The population-level parameters receive their own priors:

$$ \mu\sim\pi(\mu) $$
$$ \tau\sim\pi(\tau) $$

The resulting model contains several sources of uncertainty simultaneously.

Three levels of uncertainty: The patient outcomes are uncertain, the group-specific parameters are uncertain, and the population-level parameters describing the distribution of group effects are uncertain.

Exchangeability

Hierarchical Bayesian models are closely connected to the concept of exchangeability.

Suppose treatment effects from several studies are represented by:

$$ \theta_1,\theta_2,\ldots,\theta_K $$

If the studies are considered exchangeable, their labels do not determine their prior treatment-effect distributions.

A simple representation is:

$$ \theta_k\mid\mu,\tau \overset{\text{iid}}{\sim} N(\mu,\tau^2) $$

This does not mean that all studies have the same treatment effect.

It means that before observing the study-specific data, the effects are considered to arise from the same population distribution.

Important: Exchangeability is not the same as equality. A hierarchical model can allow substantial differences between groups while assuming that the groups are generated from a common distribution.

Between-Group Heterogeneity

The parameter \(\tau\) controls the amount of between-group heterogeneity.

$$ \theta_j\sim N(\mu,\tau^2) $$

If:

$$ \tau\approx0 $$

the group-specific effects are concentrated near \(\mu\).

The groups behave approximately like a common-effect population.

If \(\tau\) is large, the model permits substantial differences between groups.

Value of \(\tau\) Interpretation
Near 0 Little between-group heterogeneity
Moderate Meaningful but limited heterogeneity
Large Substantial variation among group effects

Partial Pooling and Shrinkage

One of the most important consequences of hierarchical modeling is shrinkage.

Suppose center \(j\) has an observed treatment effect that is unusually large. A hierarchical model does not necessarily accept that estimate at face value.

Instead, it asks: How much evidence does this center provide for having a genuinely unusual effect, given both its own data and the distribution of effects across all centers?

An estimate based on a small sample will generally be pulled more strongly toward the population mean.

An estimate based on a large sample will generally be pulled less.

Shrinkage is not a flaw. It is the statistical consequence of combining group-specific evidence with information about the population distribution of effects.

A Simple Normal-Normal Example

Suppose study \(j\) produces an approximately normal estimate:

$$ \hat\theta_j \mid \theta_j \sim N(\theta_j,s_j^2) $$

Assume the hierarchical prior:

$$ \theta_j \sim N(\mu,\tau^2) $$

If \(\mu\) and \(\tau\) are treated as known, the posterior distribution is also normal.

The posterior mean is:

$$ E(\theta_j\mid\hat\theta_j) = w_j\hat\theta_j + (1-w_j)\mu $$

where:

$$ w_j = \frac{\tau^2} {\tau^2+s_j^2} $$

The weight \(w_j\) determines how strongly the study-specific estimate influences the posterior.

Understanding the Shrinkage Weight

Consider the two extremes.

If the study is very precise:

$$ s_j^2\rightarrow0 $$

then:

$$ w_j\rightarrow1 $$

and the posterior estimate approaches the observed estimate.

If the study is very imprecise:

$$ s_j^2\rightarrow\infty $$

then:

$$ w_j\rightarrow0 $$

and the posterior estimate approaches the population mean.

This is the essence of partial pooling: Precise groups are allowed to speak more loudly, while noisy groups are regularized toward the population distribution.

Worked Shrinkage Example

Suppose the overall treatment-effect distribution has:

$$ \mu=0.20 $$
and:

$$ \tau=0.10 $$

Consider a small study with:

$$ \hat\theta_j=0.50 $$

and standard error:

$$ s_j=0.20 $$

The shrinkage weight is:

$$ w_j = \frac{0.10^2} {0.10^2+0.20^2} = \frac{0.01}{0.05} = 0.20 $$

Therefore the posterior mean is:

$$ E(\theta_j\mid D) = 0.20(0.50)+0.80(0.20) $$
$$ \boxed{ E(\theta_j\mid D)=0.26 } $$

The raw estimate was 0.50, but the hierarchical estimate is 0.26.

The reason is that the study provides relatively weak information about its true effect.

What If the Study Is Large?

Suppose the same observed effect occurs in a much larger study with:

$$ s_j=0.05 $$

Then:

$$ w_j = \frac{0.01} {0.01+0.0025} = 0.80 $$

The posterior mean becomes:

$$ E(\theta_j\mid D) = 0.80(0.50)+0.20(0.20) = 0.44 $$

The estimate is still shrunk, but much less strongly.

This illustrates why hierarchical models do not simply force small studies to look like large studies.

Instead, the amount of borrowing depends on the information contained in the individual group's data and the estimated heterogeneity across groups.

Bayesian Hierarchical Models for Multi-Center Trials

Suppose a randomized clinical trial includes \(J\) centers. Let:

$$ Y_{ij} = \text{outcome for patient }i \text{ in center }j $$

A simple continuous-outcome model could be:

$$ Y_{ij} \sim N(\mu_j,\sigma^2) $$

where:

$$ \mu_j = \alpha_j+\beta_jT_{ij} $$

Here \(T_{ij}\) indicates treatment assignment.

The center-specific treatment effects can then be modeled hierarchically:

$$ \beta_j \sim N(\beta,\tau_\beta^2) $$

The parameter \(\beta\) represents the population-average treatment effect, while \(\tau_\beta\) represents heterogeneity in treatment effects across centers.

Random Intercepts

Hierarchical models do not require treatment effects to vary by group.

A common model allows centers to have different baseline outcomes while assuming a common treatment effect.

$$ Y_{ij} = \alpha_j+\beta T_{ij}+\epsilon_{ij} $$

with:

$$ \alpha_j \sim N(\alpha,\tau_\alpha^2) $$

The center-specific intercepts account for baseline differences among centers.

This is commonly called a random-intercept model.

Random Slopes

If the treatment effect itself varies across centers, a random slope can be introduced:

$$ Y_{ij} = \alpha_j+\beta_jT_{ij}+\epsilon_{ij} $$

with:

$$ \begin{pmatrix} \alpha_j\\ \beta_j \end{pmatrix} \sim N \left[ \begin{pmatrix} \alpha\\ \beta \end{pmatrix}, \Sigma \right] $$

The covariance matrix \(\Sigma\) can represent variation in baseline outcomes, variation in treatment effects, and correlation between the two.

Random Intercept vs. Random Slope

Model Allows Clinical Interpretation
Random intercept Baseline differences Centers may have different average outcomes
Random slope Treatment-effect differences Treatment may work differently across centers
Random intercept + slope Both Centers differ in baseline and treatment response

Binary Outcomes

Hierarchical models are especially useful when clinical endpoints are binary.

Suppose:

$$ Y_{ij} \sim \operatorname{Bernoulli}(p_{ij}) $$

A hierarchical logistic model can be written as:

$$ \operatorname{logit}(p_{ij}) = \alpha_j+\beta T_{ij} $$

where:

$$ \alpha_j \sim N(\alpha,\tau_\alpha^2) $$

This allows center-specific baseline response probabilities.

Hierarchical Treatment Effects for Binary Outcomes

To allow treatment effects to vary:

$$ \operatorname{logit}(p_{ij}) = \alpha_j+\beta_jT_{ij} $$

and:

$$ \beta_j \sim N(\beta,\tau_\beta^2) $$

The treatment-specific odds ratio for center \(j\) is:

$$ OR_j=e^{\beta_j} $$

The hierarchical model therefore produces a posterior distribution for each center's treatment effect as well as the overall distribution of treatment effects.

Hierarchical Models for Continuous Outcomes

For a continuous endpoint such as change from baseline:

$$ Y_{ij} \sim N(\mu_{ij},\sigma^2) $$

A simple model is:

$$ \mu_{ij} = \alpha_j+\beta T_{ij} $$

with:

$$ \alpha_j\sim N(\alpha,\tau_\alpha^2) $$

This can represent center-specific baseline levels while estimating a common treatment effect.

If treatment effects vary:

$$ \beta_j\sim N(\beta,\tau_\beta^2) $$

The same conceptual framework applies.

Hierarchical Models for Count Outcomes

Clinical research also frequently involves counts, such as:

  • Number of exacerbations
  • Number of hospitalizations
  • Number of adverse events
  • Number of disease episodes

A Poisson hierarchical model could be:

$$ Y_{ij} \sim \operatorname{Poisson}(\lambda_{ij}) $$
$$ \log(\lambda_{ij}) = \alpha_j+\beta T_{ij} $$

with a hierarchical center effect:

$$ \alpha_j\sim N(\alpha,\tau_\alpha^2) $$

For overdispersed outcomes, a negative-binomial likelihood may be more appropriate.

Hierarchical Models for Time-to-Event Outcomes

Hierarchical structures can also be incorporated into survival models.

For example, a proportional hazards model could be written:

$$ h_{ij}(t) = h_{0j}(t) \exp(\beta T_{ij}) $$

where the baseline hazard can vary by center.

Alternatively, treatment effects can vary hierarchically:

$$ \beta_j \sim N(\beta,\tau_\beta^2) $$

The resulting model can estimate both an overall treatment effect and between-center heterogeneity.

Hierarchical Models for Repeated Measures

Repeated-measures data have a natural hierarchical structure because observations are nested within patients.

For patient \(i\) at time \(t\):

$$ Y_{it} = \alpha_i+\beta t+\epsilon_{it} $$

A random intercept model might use:

$$ \alpha_i \sim N(\alpha,\tau_\alpha^2) $$

This allows patients to have different baseline values.

A random slope model could additionally allow individual trajectories to vary:

$$ Y_{it} = \alpha_i+\beta_i t+\epsilon_{it} $$

with:

$$ \begin{pmatrix} \alpha_i\\ \beta_i \end{pmatrix} \sim N \left[ \begin{pmatrix} \alpha\\ \beta \end{pmatrix}, \Sigma \right] $$

This is particularly useful when patients have different baseline disease severity and different rates of change over time.

Hierarchical Models for Subgroup Effects

Clinical trials often evaluate treatment effects in subgroups such as:

  • Age categories
  • Sex
  • Disease severity
  • Biomarker-defined populations
  • Geographic regions
  • Prior treatment status

A separate analysis for every subgroup can produce unstable estimates, especially when some subgroups are small.

A hierarchical model can allow subgroup-specific effects:

$$ \theta_k \sim N(\mu,\tau^2) $$

where \(k\) indexes subgroups.

The model estimates each subgroup while allowing the subgroups to share information.

Why Hierarchical Subgroup Models Can Be Preferable

Suppose a trial has ten subgroups. If each subgroup is analyzed independently, a small subgroup may produce an extreme estimate simply because its sample size is limited.

A hierarchical model provides regularization.

A subgroup with little information is pulled toward the overall effect, whereas a subgroup with strong evidence for a genuinely different effect can remain distinct.

Important: Shrinkage should not be interpreted as evidence that subgroup effects are identical. It represents a compromise between subgroup-specific evidence and the estimated distribution of effects across subgroups.

Historical Borrowing

One of the most important clinical applications of Bayesian hierarchical models is borrowing information from historical or external data.

Suppose a current clinical trial has a control group with a relatively small sample size. Historical trials may contain substantial information about the control response rate.

Instead of treating the historical response rate as either completely irrelevant or perfectly interchangeable with the current control group, a hierarchical model can allow the historical and current effects to be related but not identical.

A Hierarchical Historical-Control Model

Suppose study \(j\) has control response probability \(p_j\). A convenient transformed scale is the logit:

$$ \theta_j = \operatorname{logit}(p_j) $$

The study-specific effects can be modeled as:

$$ \theta_j \sim N(\mu,\tau^2) $$

The current study is treated as another member of the distribution, but the model estimates the amount of between-study heterogeneity.

If the historical studies are highly compatible with the current study, more borrowing occurs.

If they are inconsistent, the estimated heterogeneity can reduce the amount of borrowing.

Historical borrowing should never be assumed to be automatically appropriate. Differences in patient eligibility, endpoint definitions, standard of care, follow-up, geography, and trial conduct can make historical data non-exchangeable.

Borrowing Is Controlled by Heterogeneity

The central parameter is again:

$$ \tau $$

Small \(\tau\) implies that the studies are similar.

Large \(\tau\) implies that the studies may differ substantially.

Thus the hierarchical model can adapt the amount of borrowing according to the estimated compatibility among studies.

Complete Pooling vs. Hierarchical Historical Borrowing

Method Historical Information Assumption
Ignore historical data None Current study stands alone
Complete pooling Strong Historical and current effects are effectively identical
Hierarchical borrowing Adaptive Effects are related but can differ

Meta-Analysis as a Hierarchical Model

Bayesian hierarchical models provide a natural framework for meta-analysis.

Suppose study \(k\) estimates a treatment effect \(\hat\theta_k\) with standard error \(s_k\). A simple likelihood is:

$$ \hat\theta_k \sim N(\theta_k,s_k^2) $$

The study-specific effects follow:

$$ \theta_k \sim N(\mu,\tau^2) $$

The overall effect is \(\mu\), while \(\tau\) represents between-study heterogeneity.

This is the Bayesian analogue of a random-effects meta-analysis.

Hierarchical Models and Clinical Trial Estimands

A sophisticated hierarchical model does not replace the need to define the clinical estimand.

Before specifying the model, investigators should determine what treatment effect is actually being estimated.

For example:

  • Population-average treatment effect
  • Center-specific treatment effect
  • Subgroup treatment effect
  • Average treatment effect across a distribution of populations
  • Probability that treatment benefit exceeds a clinical threshold

A hierarchical model can estimate several of these quantities, but they are not automatically interchangeable.

Model first, estimand first: Do not begin with a hierarchical model simply because the data are clustered. First define the scientific question and estimand, then determine what hierarchical structure is appropriate.

Population-Average vs. Group-Specific Effects

Suppose:

$$ \theta_j\sim N(\mu,\tau^2) $$

The parameter \(\mu\) describes the mean of the distribution of group-specific effects.

It does not necessarily equal every group's treatment effect.

For a randomly selected group from the modeled population:

$$ E(\theta_j)=\mu $$

But individual groups may have:

$$ \theta_j\ne\mu $$

This distinction becomes particularly important when interpreting subgroup effects.

Conditional vs. Marginal Effects

In nonlinear models such as logistic regression, the population-average (marginal) effect is not necessarily equal to the average of the conditional group-specific effects after transformation.

For example, if:

$$ \operatorname{logit}(p_{ij}) = \alpha_j+\beta T_{ij} $$

then \(e^\beta\) is a conditional odds ratio on the model's log-odds scale.

A marginal population-level treatment effect may require integrating over the distribution of the random effects.

Therefore, analysts should distinguish between:

  • Conditional effects
  • Population-average effects
  • Subject-specific effects
  • Cluster-specific effects

Bayesian Posterior Distribution in a Hierarchical Model

Let the observed data be \(D\), group-specific parameters be \(\theta=(\theta_1,\ldots,\theta_K)\), and hyperparameters be \(\phi=(\mu,\tau)\). The posterior is:

$$ p(\theta,\phi\mid D) \propto p(D\mid\theta) p(\theta\mid\phi) p(\phi) $$

The likelihood describes the patient-level observations.

The hierarchical distribution describes how group-specific parameters relate to the population-level parameters.

The hyperprior describes uncertainty about the population-level parameters.

Think in layers: Patient data inform group-specific parameters. Group-specific parameters inform the population distribution. The population distribution informs how much groups borrow information from one another.

Hyperparameters and Hyperpriors

Parameters that govern the distribution of other parameters are often called hyperparameters.

In:

$$ \theta_j\sim N(\mu,\tau^2) $$

\(\mu\) and \(\tau\) are hyperparameters for the distribution of \(\theta_j\).

They can themselves have prior distributions. For example:

$$ \mu\sim N(0,1) $$
$$ \tau\sim\operatorname{HalfNormal}(0,1) $$

The exact scale should be chosen based on the scale and plausible range of the clinical parameter.

Why Priors on Heterogeneity Matter

The between-group standard deviation \(\tau\) is often difficult to estimate, especially when there are relatively few groups.

Consequently, the prior on \(\tau\) can have substantial influence.

An overly permissive prior may imply implausibly large heterogeneity.

An overly restrictive prior may force the model toward near-complete pooling.

Practical lesson: Prior specification for variance and heterogeneity parameters deserves particular attention. Always assess whether the prior permits clinically plausible amounts of between-group variation.

Prior Predictive Checking

Before fitting a hierarchical model, investigators can simulate outcomes from the prior predictive distribution.

Conceptually:

$$ \phi\sim p(\phi) $$
$$ \theta_j\sim p(\theta_j\mid\phi) $$
$$ Y_{ij}\sim p(Y_{ij}\mid\theta_j) $$

The resulting simulated datasets should be examined for plausibility.

If the model frequently generates impossible or clinically absurd outcomes, the prior specification should be reconsidered.

Posterior Predictive Checking

After fitting the model, the same idea can be applied using the posterior.

Draw parameters from:

$$ p(\theta,\phi\mid D) $$

and generate replicated datasets:

$$ Y^{rep} \sim p(Y^{rep}\mid\theta) $$

The replicated outcomes can be compared with the observed data.

Useful comparisons may include:

  • Overall event rates
  • Group-specific event rates
  • Distribution of outcomes
  • Extreme observations
  • Between-center variability
  • Within-patient variability
  • Correlation structures
A model can converge perfectly and still be wrong. Computational convergence tells you that the algorithm has adequately explored the specified posterior. Posterior predictive checks ask whether the model can reasonably reproduce important features of the observed data.

Posterior Prediction for a New Center

One advantage of hierarchical models is that they naturally support prediction for a new group.

Suppose a future center has not yet contributed data. Its treatment effect can be predicted from the population distribution:

$$ \theta_{\text{new}} \sim N(\mu,\tau^2) $$

When uncertainty in \(\mu\) and \(\tau\) is included:

$$ p(\theta_{\text{new}}\mid D) = \int p(\theta_{\text{new}}\mid\mu,\tau) p(\mu,\tau\mid D) \,d\mu\,d\tau $$

This produces a posterior predictive distribution for a future center.

Clinical Interpretation of a New-Center Prediction

Suppose a trial estimates:

$$ P(\theta_{\text{new}}>0\mid D)=0.87 $$

This could be interpreted as: Given the hierarchical model and observed trial data, the posterior probability that a future exchangeable center has a positive treatment effect is 87%.

This is different from:

$$ P(\mu>0\mid D) $$

because the latter concerns the mean treatment effect across the modeled population of centers.

Hierarchical Models for Rare Diseases

Rare disease trials often have small sample sizes.

This creates an especially challenging combination:

  • Few patients
  • Few events
  • Multiple clinical centers
  • Potentially substantial patient heterogeneity
  • Limited opportunities for independent replication

Hierarchical models can potentially improve estimation by allowing related populations to share information.

Examples include:

  • Multiple rare disease trials
  • Related disease subtypes
  • Historical controls
  • Multiple endpoints
  • Age-defined populations

However, the validity of the borrowing depends critically on the plausibility of the exchangeability assumptions.

Borrowing Across Related Indications

Suppose a therapy is studied in several related diseases. Let:

$$ \theta_k = \text{treatment effect in indication }k $$

A hierarchical model could specify:

$$ \theta_k \sim N(\mu,\tau^2) $$

This permits the indications to have related effects without requiring them to be identical.

If one indication has sparse data, its estimate may borrow information from the other indications.

But "related" must be scientifically defensible. A hierarchical model should not be used simply because two diseases share a mechanism or treatment. Clinical prognosis, endpoint behavior, treatment response, and patient characteristics should be considered.

Dynamic Borrowing

Hierarchical models are sometimes described as providing dynamic borrowing.

The amount of borrowing depends on how compatible the data are with the assumed common distribution.

When groups appear similar, the model can borrow more strongly.

When groups differ substantially, the estimated heterogeneity increases and borrowing becomes weaker.

This is one of the most attractive features of hierarchical modeling compared with simply combining all observations.

But Dynamic Borrowing Is Not Magic

The model can only adapt to differences that are represented by the hierarchical structure.

If there is a systematic difference between groups that is not modeled, the hierarchical model can still borrow inappropriately.

For example, historical studies may differ systematically because of:

  • Changes in standard of care
  • Different eligibility criteria
  • Different diagnostic definitions
  • Different follow-up periods
  • Changes in supportive therapy
  • Different endpoint assessment procedures

A hierarchical distribution does not automatically correct these problems.

Adding Covariates to a Hierarchical Model

Hierarchical models can incorporate patient-level and group-level covariates.

Suppose treatment effect varies with a patient-level biomarker \(X_{ij}\):

$$ Y_{ij} = \alpha_j + \beta T_{ij} + \gamma X_{ij} + \delta T_{ij}X_{ij} + \epsilon_{ij} $$

The interaction parameter \(\delta\) describes how treatment effect changes with the biomarker.

The center-specific intercept may still be modeled hierarchically:

$$ \alpha_j \sim N(\alpha,\tau_\alpha^2) $$

The treatment effect itself could also vary hierarchically.

Cross-Level Interactions

Hierarchical models can also represent interactions between patient-level and group-level characteristics.

For example, suppose \(X_{ij}\) is a patient biomarker and \(Z_j\) is a center-level characteristic. A model could include:

$$ Y_{ij} = \alpha_j + \beta T_{ij} + \gamma X_{ij} + \delta Z_j + \eta X_{ij}Z_j + \epsilon_{ij} $$

The interaction term \(\eta\) allows the association between the patient-level biomarker and outcome to depend on the center-level characteristic.

These structures can become complex quickly, so prespecification and careful model diagnostics are important.

Multilevel Models vs. Fixed-Effects Models

A center can be included in a model using fixed effects or random effects.

A fixed-effects approach might include center indicators:

$$ Y_{ij} = \alpha + \sum_{j=2}^{J}\gamma_jI(\text{center}=j) + \beta T_{ij} + \epsilon_{ij} $$

A hierarchical model instead treats center effects as draws from a population distribution.

$$ \alpha_j \sim N(\alpha,\tau_\alpha^2) $$

These approaches answer somewhat different questions and rely on different assumptions.

Feature Fixed Effects Hierarchical Effects
Group parameters Estimated separately Drawn from a common distribution
Partial pooling No Yes
New-group prediction Limited Natural
Heterogeneity Separate coefficients Explicit variance parameter
Shrinkage No Yes

Hierarchical Bayesian Models and Multiple Comparisons

Hierarchical models are sometimes described as a solution to multiplicity. That statement requires care.

Suppose 20 subgroup treatment effects are estimated. A hierarchical model can regularize extreme estimates by shrinking them toward the population distribution.

This can reduce overinterpretation of noisy subgroup estimates.

However, shrinkage is not identical to a conventional frequentist multiplicity adjustment.

The model addresses the problem through a probability distribution and regularization structure rather than automatically controlling a frequentist family-wise error rate.

Do not say that hierarchical modeling "eliminates multiplicity." It can provide useful regularization and reduce the instability of many simultaneous estimates, but the appropriate inferential and decision criteria still need to be defined.

Hierarchical Models and Multiplicity in Subgroup Analysis

Suppose there are \(K\) subgroup effects:

$$ \theta_1,\ldots,\theta_K $$

A hierarchical prior:

$$ \theta_k\sim N(\mu,\tau^2) $$

encourages estimates to remain compatible with the overall distribution unless there is sufficient subgroup-specific information to support divergence.

This can be particularly useful for exploratory subgroup analyses.

However, confirmatory subgroup claims may require additional prespecification and decision criteria.

Non-Centered Parameterization

Hierarchical Bayesian models can create challenging posterior geometries, particularly when the number of groups is small or the between-group standard deviation is near zero.

A centered parameterization is:

$$ \theta_j = \mu+\tau z_j $$

where:

$$ z_j\sim N(0,1) $$

This representation is often called a non-centered parameterization.

It can improve sampling efficiency in some hierarchical models.

The appropriate parameterization depends on the data and model.

Computational lesson: A statistically sensible hierarchical model can still be difficult to estimate. Parameterization, scaling, priors, and sampling diagnostics matter.

MCMC Estimation

Many hierarchical Bayesian models do not have closed-form posterior distributions.

They are commonly estimated using Markov chain Monte Carlo methods such as:

  • Hamiltonian Monte Carlo
  • No-U-Turn Sampling
  • Other MCMC algorithms

The goal is to obtain draws from the posterior distribution:

$$ \theta^{(1)},\theta^{(2)},\ldots,\theta^{(M)} \sim p(\theta\mid D) $$

Posterior summaries can then be calculated from these draws.

Convergence Diagnostics

A hierarchical Bayesian analysis should assess whether the computational algorithm has adequately explored the posterior distribution.

Common diagnostics include:

  • Trace plots
  • Effective sample size
  • \(\hat R\) convergence diagnostics
  • Monte Carlo standard error
  • Divergent transitions for HMC-based methods
  • Maximum treedepth warnings
  • Energy diagnostics where appropriate
Convergence is necessary but not sufficient. Good MCMC diagnostics do not establish that the scientific model is correct. They establish that the computational procedure has adequately sampled the specified posterior.

Why Divergent Transitions Matter

In Hamiltonian Monte Carlo, divergent transitions can indicate that the algorithm is having difficulty exploring parts of the posterior geometry.

They are particularly common in hierarchical models with difficult variance-component structures.

Possible remedies can include:

  • Improving parameterization
  • Using more appropriate priors
  • Rescaling predictors
  • Increasing the HMC target acceptance rate
  • Reconsidering model complexity

Simply ignoring divergent transitions is not good practice.

Centering and Scaling Predictors

Hierarchical regression models often benefit from sensible scaling of continuous covariates.

Suppose age is entered as:

$$ X=\text{age in years} $$

A centered variable might be:

$$ X^*=X-\bar X $$

This can make the intercept easier to interpret and can improve computational geometry.

Scaling can be especially useful when predictors have very different magnitudes.

Bayesian Hierarchical Model in R

A simple hierarchical normal model can be fit using a Bayesian modeling package such as brms.

Suppose the data contain:

  • y: continuous outcome
  • treatment: treatment indicator
  • center: clinical center

A model with center-specific intercepts and a common treatment effect can be specified as:

library(brms)

fit <- brm(
  y ~ treatment + (1 | center),
  data = dat,
  family = gaussian(),
  chains = 4,
  iter = 4000,
  seed = 1234
)

The expression:

(1 | center)

specifies a varying intercept by center.

A Random-Slope Model in R

If the treatment effect is expected to vary across centers, the model can include a varying treatment slope:

fit <- brm(
  y ~ treatment + (1 + treatment | center),
  data = dat,
  family = gaussian(),
  chains = 4,
  iter = 4000,
  seed = 1234
)

The model now estimates:

  • A population-average intercept
  • A population-average treatment effect
  • Center-specific intercept deviations
  • Center-specific treatment-effect deviations
  • Between-center variability
  • Correlation between center intercepts and treatment effects

Inspecting the Posterior

Posterior summaries can be obtained with:

summary(fit)

Posterior draws can be extracted with:

draws <- as_draws_df(fit)

A posterior distribution for the overall treatment effect can then be summarized using the model's posterior draws.

Posterior Probability of Clinical Benefit

Suppose the clinically important treatment effect is \(\delta\). The Bayesian question may be:

$$ P(\beta>\delta\mid D) $$

For example, if the treatment effect is stored as b_treatment:

mean(
  draws$b_treatment > 0.20
)

This calculates the proportion of posterior draws in which the treatment effect exceeds 0.20.

If the result is 0.94, the posterior probability is approximately 94%.

Clinical interpretation: The threshold should represent a clinically meaningful effect, not merely an arbitrary statistical cutoff.

Extracting Center-Specific Effects

For a varying-slope model, posterior draws for center-specific effects can be examined using:

coef(fit)$center

This allows investigators to examine the posterior treatment effect for each center.

The key advantage is that these estimates are not independent estimates based only on each center's data.

They are informed by both center-specific observations and the population-level hierarchical distribution.

Posterior Predictive Checking in R

Posterior predictive checks can be performed using:

pp_check(fit)

Additional checks can examine specific aspects of the outcome distribution.

For example:

pp_check(
  fit,
  type = "dens_overlay"
)

The goal is not to make the replicated data look identical to the observed data.

The goal is to determine whether the model reproduces important features of the observed data.

Comparing Complete and Hierarchical Models

Suppose there are two competing models.

A complete-pooling model:

fit_pool <- brm(
  y ~ treatment,
  data = dat,
  family = gaussian()
)

and a hierarchical model:

fit_hier <- brm(
  y ~ treatment + (1 + treatment | center),
  data = dat,
  family = gaussian()
)

The models make different assumptions about center-level variation.

The hierarchical model should not automatically be preferred simply because it is more flexible.

Model comparison and predictive diagnostics should be considered alongside scientific plausibility.

Model Complexity

A hierarchical model can become very complex.

For example, a clinical trial might have:

  • Patients nested within centers
  • Centers nested within regions
  • Repeated measurements within patients
  • Multiple treatment arms
  • Biomarker-defined subgroups

A model could theoretically represent all of these levels.

However, complexity should be justified by the scientific question and the available data.

More hierarchy is not automatically better. Every additional random effect or variance component introduces parameters that must be estimated and assumptions that must be defended.

Three-Level Clinical Data

Consider patients nested within centers, with centers nested within regions.

A three-level model could be:

$$ Y_{ijk} = \mu + u_k + v_{jk} + \beta T_{ijk} + \epsilon_{ijk} $$

where:

  • \(i\) indexes patients
  • \(j\) indexes centers
  • \(k\) indexes regions
  • \(u_k\) is the regional effect
  • \(v_{jk}\) is the center-within-region effect

The variance structure can be:

$$ u_k\sim N(0,\tau_{\text{region}}^2) $$
$$ v_{jk}\sim N(0,\tau_{\text{center}}^2) $$

This separates regional and center-level heterogeneity.

Crossed Hierarchical Structures

Not every clinical dataset has a simple nested structure.

For example, patients may be associated with:

  • Clinical centers
  • Investigators
  • Manufacturing lots

where these classifications are not strictly nested.

Hierarchical models can represent multiple random effects when appropriate.

For example:

$$ Y_i = \mu + u_{\text{center}[i]} + v_{\text{investigator}[i]} + \beta T_i + \epsilon_i $$

The scientific interpretation of each source of variation should be carefully considered.

Hierarchical Models for Multiple Treatment Arms

Suppose a trial evaluates several experimental doses. Let:

$$ \theta_k = \text{effect of dose }k $$

The dose-specific effects could be modeled jointly:

$$ \theta_k \sim N(\mu_\theta,\tau_\theta^2) $$

This can provide regularization across doses.

Alternatively, a dose-response model may be more scientifically appropriate. For example:

$$ E(d) = E_0 + \frac{E_{\max}d} {ED_{50}+d} $$

A hierarchical model can then allow parameters such as \(E_{\max}\) or \(ED_{50}\) to vary across patients or studies.

Hierarchical Models in PK/PD Research

Hierarchical Bayesian modeling is particularly natural in pharmacometric applications.

For example, individual pharmacokinetic parameters may be modeled as:

$$ CL_i \sim \operatorname{LogNormal}(\log(CL_{\text{pop}}),\omega_{CL}^2) $$

and:

$$ V_i \sim \operatorname{LogNormal}(\log(V_{\text{pop}}),\omega_V^2) $$

Patient-level parameters vary around population-level parameters.

Covariates can then explain some of the between-patient variability.

This same hierarchical logic underlies population PK and many PK/PD models.

Clinical connection: The hierarchical structure is not limited to clinical trial statistics. Population pharmacokinetic and pharmacodynamic models are natural examples of multilevel statistical modeling.

Borrowing Information Across Patients

Hierarchical models can also improve estimation of individual-level parameters.

Suppose patient \(i\) has limited observations. A hierarchical population model can combine:

  • The patient's own observations
  • The population distribution
  • Covariate information

The resulting individual estimate can be more stable than an estimate based only on the patient's observations.

This is conceptually similar to shrinkage in population PK.

Hierarchical Models and Missing Data

Bayesian hierarchical models can naturally incorporate uncertainty about missing outcomes through the joint probability model.

For example:

$$ p(Y_{\text{mis}},\theta\mid Y_{\text{obs}}) \propto p(Y_{\text{obs}},Y_{\text{mis}}\mid\theta) p(\theta) $$

However, simply using a Bayesian model does not make missing-data assumptions disappear.

The analyst still needs to consider whether the assumed missingness mechanism is scientifically plausible.

Sensitivity analyses may be required under alternative assumptions.

Missing at Random Is Still an Assumption

A hierarchical model may assume:

$$ Y_{\text{mis}} \perp R \mid Y_{\text{obs}},X,\theta $$

where \(R\) represents the missingness indicator.

This is related to a missing-at-random assumption.

If missingness depends on unobserved outcomes even after conditioning on observed variables, a sensitivity analysis may be necessary.

Hierarchical Models and Informative Cluster Size

An additional complication arises when cluster sizes differ substantially.

For example, some clinical centers may enroll hundreds of patients while others enroll only a handful.

The interpretation of the population-level effect can depend on whether the scientific target weights:

  • Patients equally
  • Centers equally
  • Regions equally

The estimand should therefore be clearly defined before interpreting a hierarchical model.

Prior Sensitivity in Hierarchical Models

Prior sensitivity is especially important when there are few groups.

Suppose only five centers contribute data. The between-center standard deviation \(\tau\) may be poorly identified.

Different plausible priors for \(\tau\) can therefore produce materially different amounts of shrinkage.

A responsible analysis should evaluate multiple scientifically defensible choices.

An Example of Prior Sensitivity

Suppose the primary prior is:

$$ \tau\sim\operatorname{HalfNormal}(0,0.10) $$

A sensitivity analysis might consider:

$$ \tau\sim\operatorname{HalfNormal}(0,0.20) $$

and:

$$ \tau\sim\operatorname{HalfStudentT}(3,0,0.20) $$

The exact choices should be based on the clinical scale of the treatment effect.

The purpose is not to select the prior that produces the preferred conclusion.

The purpose is to determine whether the scientific conclusion is robust to reasonable prior assumptions.

Robust Hierarchical Models

A normal hierarchical distribution may not always adequately represent between-group heterogeneity.

If occasional groups genuinely have extreme effects, a heavy-tailed distribution may be more appropriate.

For example:

$$ \theta_j \sim t_\nu(\mu,\tau) $$

A Student-\(t\) distribution can permit more extreme deviations than a normal distribution.

This can be useful when the assumption that all group effects are tightly concentrated around a normal distribution is questionable.

Mixture Models and Non-Exchangeability

Sometimes the population may contain genuinely different classes of groups.

For example, centers might belong to two qualitatively different clinical practice environments.

A single exchangeable distribution may then be inappropriate.

Possible alternatives include:

  • Including relevant covariates
  • Using separate hierarchical populations
  • Mixture models
  • Non-exchangeable historical-data models

The important point is that borrowing should reflect scientific similarity, not merely statistical convenience.

Bayesian Hierarchical Models and Trial Design

Hierarchical Bayesian models can be incorporated into clinical trial design before data are collected.

Simulation can evaluate:

  • Bias
  • Mean squared error
  • Coverage
  • Posterior probability behavior
  • Borrowing behavior
  • Type I error under relevant null scenarios
  • Power or assurance
  • Decision probabilities

This is particularly important when the trial will use adaptive decisions or external information.

Operating Characteristics

Suppose a Bayesian trial declares success when:

$$ P(\theta>\delta\mid D)>0.95 $$

The operating characteristics of this rule should be evaluated under a range of true treatment effects.

For example:

$$ \theta \in \{-0.10,-0.05,0,0.05,0.10,0.20\} $$

Simulation can determine how often the trial declares success under each scenario.

Prespecification matters: The posterior probability threshold, prior, hierarchical structure, stopping rules, and decision criteria should be established before examining the trial outcomes when used for confirmatory decision making.

Borrowing and Type I Error

When historical information is borrowed, investigators may need to evaluate frequentist operating characteristics even when the primary analysis is Bayesian.

For example, simulation can evaluate the probability of declaring treatment benefit when the current treatment is actually ineffective.

This can be particularly important for regulatory discussions.

A Bayesian analysis can therefore be evaluated using both Bayesian quantities and frequentist operating characteristics.

A Simple Simulation Framework

A conceptual simulation study can follow this structure:

1
Specify the true treatment effect and heterogeneity.
2
Generate historical and/or current study data.
3
Fit the hierarchical Bayesian model.
4
Apply the prespecified decision criterion.
5
Repeat the process many times.
6
Summarize operating characteristics across scenarios.

Common Clinical Applications

Application Hierarchical Structure
Multi-center trial Patients within centers
Subgroup analysis Patients within subgroups
Meta-analysis Patients/trial estimates within studies
Historical borrowing Current and historical studies
Rare disease Related studies or disease subtypes
Repeated measures Observations within patients
PK/PD Observations within individuals within a population
Platform trial Multiple arms and populations
Geographic heterogeneity Patients within regions and centers

Advantages of Bayesian Hierarchical Models

Bayesian hierarchical models offer several important advantages.

  • Partial pooling across related groups
  • Stable estimates for small groups
  • Direct modeling of between-group heterogeneity
  • Formal incorporation of external information
  • Natural posterior prediction for new groups
  • Flexible multilevel structures
  • Direct probability statements about clinically meaningful quantities
  • Natural integration with decision analysis
  • Useful framework for complex clinical datasets

Limitations of Bayesian Hierarchical Models

The flexibility of hierarchical models also creates important challenges.

  • Models can be computationally demanding
  • Few groups can make variance components weakly identified
  • Prior specification can materially affect results
  • Exchangeability assumptions may be questionable
  • Excessive borrowing can produce misleading estimates
  • Complex models can be difficult to validate
  • MCMC diagnostics may be required
  • Interpretation of conditional and marginal effects can be complicated
  • Regulatory expectations may require additional operating-characteristic analyses
Flexibility is not automatically an advantage. A hierarchical model should be no more complicated than necessary to answer the clinical question credibly.

Common Misconception: "Hierarchical Means All Groups Are the Same"

This is incorrect.

The model:

$$ \theta_j\sim N(\mu,\tau^2) $$

explicitly allows groups to differ.

The parameter \(\tau\) measures how much they differ.

If \(\tau\) is large, the model supports substantial heterogeneity.

Hierarchical modeling therefore does not eliminate heterogeneity. It estimates it.

Common Misconception: "Shrinkage Means the Model Is Biased"

Shrinkage can feel counterintuitive because an estimate is intentionally moved away from the raw group-specific estimate.

But the purpose is to reduce the influence of noisy estimates.

For a small group, an extreme observed estimate may have high variance. A hierarchical model recognizes that uncertainty.

The resulting posterior estimate may therefore have better predictive performance than the unpooled estimate.

Think of shrinkage as regularization informed by the population. The model trades some group-specific extremeness for improved stability when the data do not strongly support that extremeness.

Common Misconception: "More Borrowing Is Always Better"

Borrowing is beneficial only when the groups are sufficiently related.

If two studies are fundamentally different, forcing them to share information can introduce bias.

The key question is: Would it be scientifically reasonable to believe that these groups could have arisen from the same underlying population of effects?

Common Misconception: "A Large Heterogeneity Parameter Means the Model Failed"

Not necessarily.

A large posterior estimate of \(\tau\) may be an important scientific result.

It may indicate that:

  • Treatment effects genuinely vary across populations
  • Clinical practice modifies treatment response
  • Patient characteristics are important effect modifiers
  • The populations may not be exchangeable

The correct response may be to investigate the source of heterogeneity rather than simply force a common-effect model.

Common Misconception: "Hierarchical Models Solve Small Sample Problems"

Hierarchical modeling can stabilize estimates, but it cannot manufacture information that does not exist.

With very little information, posterior results can still be strongly influenced by the prior.

The model should therefore communicate uncertainty rather than create a false impression of precision.

Common Mistakes

  1. Ignoring the hierarchy in clustered data. Patients within the same center or repeated observations within the same patient are generally not independent.
  2. Using complete pooling when meaningful heterogeneity is expected. Forcing all groups to share one effect can conceal important variation.
  3. Using no pooling for many small groups. Independent estimates can become extremely unstable.
  4. Assuming hierarchical models automatically produce unbiased estimates. They remain dependent on the likelihood, prior, exchangeability, and model structure.
  5. Ignoring the prior on the heterogeneity parameter. The prior for \(\tau\) can materially affect shrinkage when the number of groups is small.
  6. Borrowing from historically incompatible populations. Differences in standard of care, eligibility, endpoints, and follow-up can invalidate exchangeability assumptions.
  7. Interpreting shrinkage as proof that groups are identical. Shrinkage reflects uncertainty and information sharing, not equality.
  8. Ignoring divergent MCMC transitions. Computational warnings can indicate that the posterior has not been sampled reliably.
  9. Relying only on convergence diagnostics. A converged model can still be scientifically inappropriate.
  10. Failing to perform prior sensitivity analyses. Small numbers of groups can make hierarchical variance parameters weakly identified.
  11. Confusing conditional and marginal treatment effects. This is especially important for nonlinear models such as logistic regression.
  12. Adding random effects without a scientific reason. Complexity should correspond to the data-generating structure and estimand.

A Practical Workflow for Bayesian Hierarchical Modeling

1
Define the clinical estimand and scientific question.
2
Identify the levels of clustering or repeated measurement in the data.
3
Determine which effects should be common and which should vary by group.
4
Specify the patient-level likelihood.
5
Specify hierarchical distributions for group-specific parameters.
6
Specify scientifically defensible priors for population-level parameters and heterogeneity.
7
Conduct prior predictive checks.
8
Fit the model using an appropriate computational method.
9
Assess convergence, effective sample size, and other computational diagnostics.
10
Conduct posterior predictive checks and assess model adequacy.
11
Summarize population-level, group-level, and clinically relevant posterior quantities.
12
Perform prior, model, and borrowing-sensitivity analyses.

How to Interpret a Hierarchical Bayesian Result

Suppose a clinical trial estimates an overall treatment effect:

$$ \beta=0.15 $$

with a 95% credible interval:

$$ (0.04,0.27) $$

The posterior probability of exceeding a clinically meaningful threshold of 0.10 is:

$$ P(\beta>0.10\mid D)=0.88 $$

The hierarchical model also estimates:

$$ \tau=0.07 $$

This suggests that treatment effects vary across centers, but the estimated between-center variation is substantially smaller than the overall treatment effect.

The correct interpretation should distinguish the population-level effect from the center-specific effects.

What Should Be Reported?

A clinical Bayesian hierarchical analysis should generally report:

  • Primary estimand
  • Hierarchy and clustering structure
  • Patient-level likelihood
  • Group-level distributions
  • Population-level priors
  • Prior for heterogeneity parameters
  • Rationale for exchangeability assumptions
  • Posterior estimation method
  • Convergence diagnostics
  • Posterior predictive checks
  • Population-level estimates
  • Group-specific estimates when clinically relevant
  • Credible intervals
  • Clinically meaningful posterior probabilities
  • Prior sensitivity analyses
  • Model sensitivity analyses
  • Borrowing sensitivity when external information is used

Reporting Historical Borrowing

If historical data are used, the analysis should additionally describe:

  • Source of historical data
  • Eligibility criteria
  • Endpoint definitions
  • Follow-up differences
  • Standard-of-care differences
  • Exchangeability assumptions
  • Hierarchical borrowing model
  • Prior for between-study heterogeneity
  • Sensitivity to alternative borrowing assumptions
  • Operating characteristics under incompatibility scenarios
Transparency is essential. A reader should be able to understand not only that historical data were borrowed, but exactly how much borrowing the statistical model was permitted to perform.

Hierarchical Models vs. Simple Pooling

Feature Simple Pooling Hierarchical Bayesian Model
Group-specific effects No Yes
Between-group heterogeneity Usually ignored Explicitly modeled
Partial pooling No Yes
Borrowing information Complete Adaptive
Small-group stabilization Through complete pooling Through shrinkage
Prediction for new groups Limited Natural

Hierarchical Models vs. No Pooling

Feature No Pooling Hierarchical Bayesian Model
Group-specific estimates Yes Yes
Information sharing None Partial
Shrinkage No Yes
Small-group estimates Potentially unstable Regularized
Heterogeneity Implicit Explicitly estimated

The Most Important Mathematical Idea

The fundamental hierarchical model can be written:

$$ Y_{ij}\mid\theta_j \sim p(Y_{ij}\mid\theta_j) $$

combined with:

$$ \theta_j\mid\mu,\tau \sim N(\mu,\tau^2) $$

and:

$$ \mu,\tau \sim p(\mu,\tau) $$

The resulting posterior is:

$$ p(\theta,\mu,\tau\mid D) \propto p(D\mid\theta) p(\theta\mid\mu,\tau) p(\mu,\tau) $$

This equation captures the entire hierarchy.

The data inform the group effects. The group effects inform the population distribution. The population distribution controls the degree of information sharing.

A Mental Model for Remembering Hierarchical Bayes

Think of three levels.

1
Patients: What happened to the individual patients?
2
Groups: How does the treatment effect differ across centers, studies, or subgroups?
3
Population: What distribution describes the variation among those group effects?

The key idea is that information flows in both directions.

Individual observations inform their group. Groups collectively inform the population distribution. The population distribution regularizes individual groups.

The simplest memory aid: Complete pooling says, "All groups are the same." No pooling says, "Every group is completely independent." Hierarchical modeling says, "Groups are different, but they are related."

Bottom Line

Bayesian hierarchical models provide a powerful framework for clinical research data in which observations are naturally organized into related groups.

The central structure is:

$$ \text{Individual data} \rightarrow \text{Group-specific parameters} \rightarrow \text{Population distribution} $$

This structure allows the analyst to estimate group-specific effects while borrowing information across groups.

The resulting partial pooling often produces more stable estimates than either complete pooling or no pooling, particularly when some groups have limited information.

In clinical research, hierarchical Bayesian models can be useful for:

  • Multi-center clinical trials
  • Subgroup analyses
  • Historical-data borrowing
  • Rare disease studies
  • Meta-analysis
  • Repeated-measures studies
  • Population PK/PD modeling
  • Multi-region development programs
  • Multiple treatment arms
  • Longitudinal clinical outcomes

But hierarchical modeling is not simply a statistical technique for making small datasets appear more precise.

The credibility of the analysis depends on whether the hierarchy is scientifically reasonable, whether the exchangeability assumptions are defensible, whether the prior distributions are appropriate, whether the amount of borrowing is reasonable, and whether the computational implementation has been adequately diagnosed.

Bottom line: Bayesian hierarchical models allow related clinical groups to have their own parameters while sharing information through a common population distribution. The resulting partial pooling stabilizes noisy group-specific estimates and provides a principled framework for modeling between-group heterogeneity, historical borrowing, subgroup effects, repeated measures, and multi-center clinical data. The central modeling decision is not simply whether to pool information, but how much pooling is scientifically justified by the relationship among the populations being modeled.

References

Gelman, A. & Hill, J. (2006). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge University Press.
Gelman, A., Carlin, J.B., Stern, H.S., Dunson, D.B., Vehtari, A. & Rubin, D.B. (2013). Bayesian Data Analysis, 3rd ed. CRC Press.
McElreath, R. (2020). Statistical Rethinking: A Bayesian Course with Examples in R and Stan, 2nd ed. CRC Press.
Bürkner, P.-C. (2017). brms: An R Package for Bayesian Multilevel Models Using Stan. Journal of Statistical Software, 80(1), 1–28.
Spiegelhalter, D.J., Abrams, K.R. & Myles, J.P. (2004). Bayesian Approaches to Clinical Trials and Health-Care Evaluation. Wiley.
Berry, D.A. (2006). Bayesian clinical trials. Nature Reviews Drug Discovery, 5, 27–36.
Neuenschwander, B., Branson, M. & Gsponer, T. (2008). Critical aspects of the Bayesian approach to phase I cancer trials. Statistics in Medicine, 27, 2420–2439.
Ibrahim, J.G., Chen, M.-H. & Sinha, D. (2001). Bayesian Survival Analysis. Springer.
Gelman, A. (2006). Prior distributions for variance parameters in hierarchical models. Bayesian Analysis, 1(3), 515–534.
Piironen, J. & Vehtari, A. (2017). Comparison of Bayesian predictive methods for model selection. Statistics and Computing, 27, 711–735.