Bayesian State-Space Models
R2026bA Bayesian state-space model treats the state-space model parameters Θ as random variables, rather than fixed but unknown quantities, with joint prior distribution Π(Θ). This treatment leads to a more flexible model and intuitive inferences. Bayesian models also support linear and nonlinear state and observation equations, and enable you to specify specific non-Gaussian state disturbances, observation innovations, or custom observation distributions.
To start a Bayesian state-space model analysis, choose the right object for your model:
For a Bayesian view of the standard state-space model, optionally with linear non-Gaussian state disturbances or observation innovations, use
bssm.For a Bayesian model with nonlinear state transitions or measurement sensitivity function with linear errors, or for a model with a custom observation probability density, use
bnlssm.
For an overview of supported state-space model forms and to learn how to create a model in MATLAB®, see Create Continuous State-Space Models for Economic Data Analysis.
Objects
bssm | Create Bayesian linear state-space model (Since R2022a) |
ssm | Create standard linear Gaussian state-space model |
bnlssm | Create Bayesian nonlinear non-Gaussian state-space model (Since R2023b) |
particleoptions | Sequential Monte Carlo sampler options (Since R2026a) |
Functions
Topics
- Create Continuous State-Space Models for Economic Data Analysis
Learn how Econometrics Toolbox™ supports state-space modeling of time series.
- What Is the Kalman Filter?
Learn about the Kalman filter, and associated definitions and notations.
- Analyze Linearized DSGE Models
Analyze a dynamic stochastic general equilibrium (DSGE) model using Bayesian state-space model tools.
- Perform Outlier Detection Using Bayesian Non-Gaussian State-Space Models
Detect outliers in a time series using non-Gaussian error distributions in a Bayesian state-space model.
- Fit Bayesian Stochastic Volatility Model to S&P 500 Volatility
Fit a Bayesian stochastic volatility model to daily S&P 500 closing returns, and then forecast the volatility into a two-week horizon.
- Nowcast Bayesian Dynamic Factor Model of US Gross Domestic Product
This example shows how to nowcast economic variables, or predict them at the current or near future period, and to evaluate a nowcasting model for mixed frequency and jagged-edge economic data.