ssm2bssm
Description
The ssm2bssm
function converts a specified standard,
linear state-space model (ssm
object) to a Bayesian state-space model
(bssm
object)
specifying the state-space model structure (likelihood) and the joint prior distribution of
the parameters θ. Both models have the same state-space structure and use
the Kalman filter, but parameter estimation and analysis of the standard model involves
maximum likelihood and associated results, while the Bayesian model involves posterior
sampling.
Because the ssm
function enables you to create a standard linear
state-space model by explicitly specifying coefficient matrices, standard-to-Bayesian model
conversion can be convenient for simpler state-space models. For moderate through complex
models, create a Bayesian state-space model directly by using the bssm
function.
converts the input standard, linear state-space model, an MdlBSSM
= ssm2bssm(MdlSSM
)ssm
object with unknown parameters, to a Bayesian state-space model, a bssm
object. Both
models have the same state-space structure. The joint prior density
Π(θ), which is stored in
MdlBSSM.ParamDistribution
, is proportional to 1.
specifies Π(θ), the log joint prior density function
of the input state-space model parameters.MdlBSSM
= ssm2bssm(MdlSSM
,ParamDistribution
)
Examples
Input Arguments
Output Arguments
Tips
To determine the order of the parameters for the first input argument
of the log joint prior density functiontheta
ParamDistribution
, display the standard state-space modelMdlSSM
at the command line. MATLAB labels the parametersc
under thej
State equations
andObservation equations
headings, where
is the index of the parameter in the vectorj
.theta
For example, consider the following display of the standard state-space model
MdlSSM
.In this case,MdlSSM = State-space model type: ssm [ ... ] State equations: x1(t) = (c1)x1(t-1) + (c2)x2(t-1) + (c3)u1(t) x2(t) = x1(t-1) Observation equation: y1(t) = x1(t) + (c4)e1(t) [...]
is a 4-by-1 vector, where:theta
istheta
(1)c1
, the lag 1 AR coefficient of state variable x1,t.
istheta
(2)c2
, the lag 2 AR coefficient of state variable x1,t.
istheta
(3)c3
, the standard deviation of state disturbance u1,t.
istheta
(4)c4
, the standard deviation of observation innovation ε1,t.
Version History
Introduced in R2022a