Dynamic Metropolis-Hastings Algorithm
Dynamic Metropolis-Hastings Algorithm for Time-Varying Models · Also known as: Dynamic MH, MH for state-space models, Metropolis-Hastings in dynamic models, time-varying parameter MH
The Dynamic Metropolis-Hastings (Dynamic MH) algorithm applies the Metropolis-Hastings MCMC sampler to Bayesian state-space and time-varying parameter models. At each time step, latent states or evolving parameters are updated via proposal-and-accept moves, yielding full posterior distributions over trajectories rather than single filtered estimates.
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 Dynamic MH when your state-space or time-varying parameter model is nonlinear or non-Gaussian, making the Kalman filter or its extensions inadequate. It is suitable for moderate-length time series where full posterior inference over latent trajectories is required. Prefer particle MCMC (PMCMC) or particle filters for very long series or real-time filtering. Do not use Dynamic MH when a linear-Gaussian model applies — the Kalman smoother is exact and far cheaper. Also avoid it when only point estimates are needed, since the computational cost of full MCMC is then unnecessary.
Strengths & limitations
- Handles nonlinear, non-Gaussian state-space models where analytic filters are unavailable.
- Produces the full joint posterior over latent trajectories, not just filtered point estimates.
- Flexible: the proposal can be tailored to the model structure (random walk, Laplace approximation, prior).
- Can be combined with Gibbs steps for fixed parameters, making it a building block in complex hierarchical dynamic models.
- Well-established theoretical guarantees on convergence under mild regularity conditions.
- Single-site MH updates on long time series mix slowly due to high serial correlation among states.
- Proposal tuning is non-trivial; a poorly scaled proposal leads to very low acceptance rates or near-certain acceptance with tiny moves.
- Computationally expensive relative to the Kalman smoother for linear-Gaussian models.
- Block proposals for all time steps simultaneously can be difficult to design efficiently.
Frequently asked
How does Dynamic MH differ from the particle filter?
The particle filter is a sequential (online) algorithm that propagates a weighted set of particles forward in time, producing filtered distributions p(x_t | y_{1:t}). Dynamic MH is an offline MCMC sampler targeting the full smoothing posterior p(x_{1:T} | y_{1:T}). For full posterior inference over trajectories, Dynamic MH or particle MCMC is preferred; for real-time filtering, particle filters are used.
Why does single-site MH mix so slowly in dynamic models?
Latent states at adjacent time points are strongly correlated through the transition density. Updating one state at a time leaves neighbouring states fixed, so most proposals that improve one state worsen the fit to its neighbours, leading to high rejection rates and slow exploration. Block proposals or particle MCMC overcome this by moving all states jointly.
How should I tune the MH proposal?
A target acceptance rate of roughly 20–40% is a common heuristic for Gaussian random-walk proposals in moderate dimensions. Use adaptive MCMC during a warm-up phase to tune the proposal covariance automatically. For state-space models, a Laplace approximation to the local smoothing density is often a much better proposal than a random walk.
What is the relationship to particle MCMC?
Particle MCMC (Andrieu et al., 2010) uses a particle filter as a building block inside an MH step to propose the entire latent trajectory at once. This is essentially Dynamic MH with a sophisticated, high-dimensional proposal and greatly improves mixing for long time series.
Can Dynamic MH handle time-varying parameters rather than latent states?
Yes. Time-varying parameter models (e.g., regression coefficients that drift over time) are a special case of state-space models where the state is the parameter vector. Dynamic MH samples the full trajectory of parameters jointly with any hyperparameters governing their evolution.
Sources
- Hastings, W. K. (1970). Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57(1), 97–109. DOI: 10.1093/biomet/57.1.97 ↗
- Carlin, B. P., Polson, N. G., & Stoffer, D. S. (1992). A Monte Carlo approach to nonnormal and nonlinear state-space modeling. Journal of the American Statistical Association, 87(418), 493–500. DOI: 10.1080/01621459.1992.10475231 ↗
How to cite this page
ScholarGate. (2026, June 3). Dynamic Metropolis-Hastings Algorithm for Time-Varying Models. ScholarGate. https://scholargate.app/en/bayesian/dynamic-metropolis-hastings-algorithm
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.
- Dynamic Bayesian InferenceBayesian↔ compare
- Gibbs SamplingBayesian↔ compare
- Kalman FilterBayesian↔ compare
- Metropolis-Hastings AlgorithmBayesian↔ compare
- Particle FilterBayesian↔ compare