Time Series Bayesian Hierarchical Model
Also known as: TSBHM, Bayesian hierarchical time series, hierarchical dynamic Bayesian model, multilevel Bayesian time series
A time series Bayesian hierarchical model combines the hierarchical (multilevel) Bayesian framework with a dynamic state-space structure to analyse temporal data collected on multiple units or groups. Priors encode beliefs about both within-unit dynamics and cross-unit variation, and the posterior is obtained via MCMC or sequential Monte Carlo, yielding full probabilistic forecasts with calibrated uncertainty.
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 a time series Bayesian hierarchical model when you have repeated measurements on multiple related units (stores, patients, countries) and want to share statistical strength across units while respecting each unit's own dynamics. It is particularly valuable when some units have short histories, when you need calibrated forecast intervals rather than point forecasts, or when you need to incorporate informative priors from domain knowledge. Do not use it as a default for a single, long, stationary series where a classical ARIMA or state-space model is faster and equally accurate. Also avoid it when computation time is severely constrained, since MCMC on large panels can be slow.
Strengths & limitations
- Partial pooling automatically balances unit-specific estimation against population-level regularisation, reducing overfitting for data-sparse units.
- Full posterior distributions provide honest uncertainty quantification for both parameters and forecasts.
- Highly flexible: level, trend, seasonality, regression effects, and structural breaks can all be included as state components.
- Naturally accommodates missing observations through the state-space filtering mechanism.
- Prior knowledge about trends or seasonal amplitudes can be formally encoded and updated with data.
- MCMC can be computationally expensive for large panels or long series; approximate methods (variational inference, Laplace) trade accuracy for speed.
- Model specification (state components, prior choices, error distributions) requires substantive thought and is not fully automated.
- Posterior is sensitive to hyperprior choices when group-level data are sparse; prior sensitivity analysis is mandatory.
- Convergence diagnostics must be checked rigorously — a badly mixed chain can produce misleading summaries.
Frequently asked
How is this different from a plain hierarchical Bayesian model?
A plain hierarchical model pools parameters across units but treats observations as exchangeable — it has no notion of time order. The time series version adds a state-evolution equation that models how the latent state changes from period to period, capturing trends, seasonality, and autocorrelation that a static hierarchical model ignores.
Can I use this model for non-Gaussian outcomes such as counts or binary events?
Yes. The observation equation can be replaced with a Poisson, negative-binomial, or Bernoulli likelihood; the latent state still evolves as a Gaussian dynamic model. Inference then requires MCMC (the Kalman filter no longer applies exactly), but the hierarchical structure and partial pooling work in the same way.
How many units do I need for the hierarchical structure to be useful?
There is no hard minimum, but with fewer than about five units the hyperprior is estimated from very little data and the partial-pooling effect is weak. The approach pays off most with dozens to thousands of units, where sparse-data units benefit substantially from borrowing strength.
What software implements this model?
Stan (via RStan or PyStan) and PyMC both support full MCMC for custom hierarchical state-space models. bsts (Bayesian structural time series) in R provides a convenient interface for common specifications. The BOOM C++ library underlies bsts and is also used by Google's CausalImpact package.
How do I compare two competing hierarchical time series models?
Use leave-one-out cross-validation (LOO-CV) via the loo package, or compute the widely applicable information criterion (WAIC). Both are available from MCMC samples and account for uncertainty; they are preferable to point-estimate criteria such as AIC or BIC in a Bayesian setting.
Sources
- West, M. & Harrison, J. (1997). Bayesian Forecasting and Dynamic Models (2nd ed.). Springer. ISBN: 978-0387947259
- 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
How to cite this page
ScholarGate. (2026, June 3). Time Series Bayesian Hierarchical Model. ScholarGate. https://scholargate.app/en/bayesian/time-series-bayesian-hierarchical-model
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.
- Bayesian RegressionBayesian↔ compare
- Dynamic Bayesian NetworkBayesian↔ compare
- Hierarchical Bayesian InferenceBayesian↔ compare
- Kalman FilterBayesian↔ compare
- Multilevel Bayesian InferenceBayesian↔ compare
- Time series MCMCBayesian↔ compare