Multilevel Metropolis-Hastings
Multilevel Metropolis-Hastings Algorithm · Also known as: hierarchical Metropolis-Hastings, multilevel MH, MH for hierarchical models, blocked Metropolis-Hastings
Multilevel Metropolis-Hastings applies the Metropolis-Hastings MCMC algorithm to hierarchical (multilevel) Bayesian models, sampling jointly from group-level parameters and hyperparameters by proposing candidate values and accepting or rejecting them via a ratio that respects the full joint posterior across all levels of the model.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use multilevel Metropolis-Hastings when your data are grouped or nested (students within schools, patients within clinics) and you are fitting a hierarchical Bayesian model with a non-standard posterior that Gibbs sampling cannot handle analytically. It is flexible enough for any differentiable or non-differentiable target. Prefer Hamiltonian Monte Carlo (e.g., NUTS) over MH for continuous high-dimensional posteriors, as HMC mixes far more efficiently. MH is most useful when parameters are discrete, the likelihood is non-differentiable, or the posterior is low-dimensional. Avoid plain random-walk MH on high-dimensional multilevel models — it scales poorly and exhibits severe correlation between levels.
Strengths & limitations
- Applicable to any posterior distribution, including non-differentiable and discrete parameter spaces.
- Conceptually transparent: the acceptance step is easy to verify and debug.
- Flexible proposal design allows problem-specific tuning, such as correlated proposals that respect group structure.
- Blocking strategies can substantially improve mixing in models with correlated level-1 and level-2 parameters.
- Works as a building block inside larger samplers (e.g., hybrid MCMC, component-wise within Gibbs).
- Random-walk proposals scale poorly to high dimensions, leading to very low acceptance rates and slow mixing.
- Requires careful manual tuning of proposal covariance; adaptive MH alleviates this but adds complexity.
- Highly correlated group-level and hyperparameter posteriors cause the chain to explore the posterior slowly unless reparameterized.
- Much less efficient than Hamiltonian Monte Carlo for continuous multilevel models of moderate to high dimensionality.
- Convergence diagnostics are necessary but insufficient — poor mixing may go undetected with short runs.
Frequently asked
How does Multilevel MH differ from standard MH?
Standard MH targets a single-level posterior. Multilevel MH must navigate a joint posterior with parameters at multiple hierarchical levels (e.g., individual, group, population), requiring blocked updating strategies and careful proposal design that respects the correlation structure induced by the hierarchy.
When should I prefer Hamiltonian Monte Carlo over MH for multilevel models?
Prefer HMC (e.g., NUTS in Stan) whenever model parameters are continuous and gradients of the log-posterior are available. HMC uses gradient information to make large, informed moves and is far more efficient for the correlated, high-dimensional posteriors typical of multilevel models. Reserve MH for discrete parameters or non-differentiable likelihoods.
What is centered vs. non-centered parameterization and why does it matter?
In the centered parameterization, group effects θ_j are modeled directly; in the non-centered form, θ_j = μ + σ·z_j with z_j ~ N(0,1). When group-level data are sparse, the non-centered form decouples group effects from hyperparameters, dramatically reducing posterior correlation and improving MCMC mixing regardless of the sampler used.
How do I choose the proposal distribution?
Start with a multivariate Gaussian proposal whose covariance approximates the posterior covariance (e.g., from a pilot run or Laplace approximation). Target an acceptance rate of roughly 23% for high-dimensional blocks or 44% for scalar updates. Adaptive MH automatically tunes the proposal during warmup.
What diagnostics should I run after sampling?
Compute R-hat for all parameters (values below 1.01 indicate convergence), check effective sample size (at least 400 post-warmup draws per parameter), inspect trace plots for stationarity and good mixing, and run posterior predictive checks to confirm the model generates data resembling the observed sample.
Sources
- Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A. & Rubin, D. B. (2013). Bayesian Data Analysis (3rd ed.). CRC Press. ISBN: 978-1439840955
- Roberts, G. O. & Sahu, S. K. (1997). Updating schemes, correlation structure, blocking and parameterisation for the Gibbs sampler. Journal of the Royal Statistical Society: Series B, 59(2), 291-317. DOI: 10.1111/1467-9868.00070 ↗
How to cite this page
ScholarGate. (2026, June 3). Multilevel Metropolis-Hastings Algorithm. ScholarGate. https://scholargate.app/en/bayesian/multilevel-metropolis-hastings
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Hierarchical Bayesian InferenceBayesian↔ compare
- Metropolis-Hastings AlgorithmBayesian↔ compare
- Multilevel Bayesian InferenceBayesian↔ compare
- Multilevel Gibbs SamplingBayesian↔ compare
- Multilevel Hamiltonian Monte CarloBayesian↔ compare
- Multilevel Variational InferenceBayesian↔ compare