MATLAB Examples

Smooth states of a time-invariant, state-space model that contains a regression component.

Estimate a regression model containing a regression component, and then forecast observations from the fitted model.

Fit a state-space model that has an observation-equation regression component.

Filter states of a time-invariant, state-space model that contains a regression component.

Create a stationary ARMA model subject to measurement error using ssm .

Estimate a random, autoregressive coefficient of a state in a state-space model. That is, this example takes a Bayesian view of state-space model parameter estimation by using the

Generate data from a known model, fit a state-space model to the data, and then simulate series from the fitted model.

Generate data from a known model, fit a state-space model to the data, and then forecast states and observations states from the fitted model.

Implicitly create a diffuse state-space model that contains a regression component in the observation equation. The state model contains an ARMA(1,1) state and random walk.

Generate data from a known model, fit a state-space model to the data, and then smooth the states.

Create a time-varying, state-space model by passing a parameter-mapping function describing the model to ssm (i.e., implicitly create a state-space model).

Generate data from a known model, fit a diffuse state-space model to the data, and then smooth the states.

Create and estimate a state-space model containing time-varying parameters.

Generate data from a known model, fit a diffuse state-space model to the data, and then filter the states.

Generate data from a known model, fit a diffuse state-space model to the data, and then forecast states and observations states from the fitted model.

Generate data from a known model, fit a state-space model to the data, and then filter the states.

Generates data from a known model, fits a state-space model to the data, and then simulates series from the fitted model using the simulation smoother.

Create a time-varying, state-space model containing a random, state coefficient.

Create and estimate a diffuse state-space model containing time-varying parameters.

Create a diffuse state-space model in which one of the state variables drops out of the model after a certain period.

Implicitly create a state-space model that contains a regression component in the observation equation. The state model is an ARMA(1,1).

Forecast a state-space model using Monte-Carlo methods, and to compare the Monte-Carlo forecasts to the theoretical forecasts.

How the results of the state-space model simulation smoother ( simsmooth ) compare to the smoothed states ( smooth ).

Forecast a time-varying, state-space model, in which there is a regime change in the forecast horizon.

Forecast observations of a known, time-invariant, state-space model.

Simulate states and observations of a known, time-invariant state-space model.

Create a time-invariant, state-space model containing known parameter values using ssm .

Smooth the states of a known, time-invariant, state-space model.

Filter states of a known, time-invariant, state-space model.

Create a Markov chain object from a matrix containing observed transitions rather than a stochastic transition matrix.

Compute and visualize state redistributions, which show the evolution of the deterministic state distributions over time from an initial distribution.

Compares the estimated mixing times of several Markov chains with different structures. Convergence theorems typically require ergodic unichains. Therefore, before comparing mixing

Create a Markov chain object from a right-stochastic transition matrix that is randomly generated. Such a Markov chain is convenient for exploration and testing.

Specify certain infeasible transitions and randomly distribute others within a transition matrix for a Markov chain.

Programmatically and visually identify classes in a Markov chain. The example also extracts a recurrent class from the chain for further analysis.

Compute the stationary distribution of a Markov chain, estimate its mixing time, and determine whether the chain is ergodic and reducible. The example also shows how to remove periodicity

Visualize the structure and evolution of a Markov chain model using the dtmc plotting functions. Consider the four-state Markov chain that models real gross domestic product (GDP)

Generate and visualize random walks through a Markov chain.

Create a Markov chain object to model a hypothetical economic cycle using a stochastic transition matrix.

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a location from the following list:

See all countries