This function converts parameters from the linear stochastic differential equation model to state space model parameterization.
LinSDE2SSM(iota, phi, sigma_l, delta_t)Returns a list of state space parameters:
alpha: Numeric vector.
Vector of constant values for the dynamic model
(\(\boldsymbol{\alpha}\)).
beta: Numeric matrix.
Transition matrix relating the values of the latent variables
from the previous time point to the current time point.
(\(\boldsymbol{\beta}\)).
psi_l: Numeric matrix.
Cholesky factorization (t(chol(psi)))
of the process noise covariance matrix
\(\boldsymbol{\Psi}\).
Numeric vector. An unobserved term that is constant over time (\(\boldsymbol{\iota}\)).
Numeric matrix. The drift matrix which represents the rate of change of the solution in the absence of any random fluctuations (\(\boldsymbol{\Phi}\)).
Numeric matrix.
Cholesky factorization (t(chol(sigma)))
of the covariance matrix of volatility
or randomness in the process
(\(\boldsymbol{\Sigma}\)).
Numeric. Time interval (\(\Delta_t\)).
Ivan Jacob Agaloos Pesigan
Let the linear stochastic equation model be given by $$ \mathrm{d} \boldsymbol{\eta}_{i, t} = \left( \boldsymbol{\iota} + \boldsymbol{\Phi} \boldsymbol{\eta}_{i, t} \right) \mathrm{d} t + \boldsymbol{\Sigma}^{\frac{1}{2}} \mathrm{d} \mathbf{W}_{i, t} $$ for individual \(i\) and time \(t\). The discrete-time state space model given below represents the discrete-time solution for the linear stochastic differential equation. $$ \boldsymbol{\eta}_{i, t_{{l_{i}}}} = \boldsymbol{\alpha}_{\Delta t_{{l_{i}}}} + \boldsymbol{\beta}_{\Delta t_{{l_{i}}}} \boldsymbol{\eta}_{i, t_{l_{i} - 1}} + \boldsymbol{\zeta}_{i, t_{{l_{i}}}}, \quad \mathrm{with} \quad \boldsymbol{\zeta}_{i, t_{{l_{i}}}} \sim \mathcal{N} \left( \mathbf{0}, \boldsymbol{\Psi}_{\Delta t_{{l_{i}}}} \right) $$ with $$ \boldsymbol{\beta}_{\Delta t_{{l_{i}}}} = \exp{ \left( \Delta t \boldsymbol{\Phi} \right) }, $$
$$ \boldsymbol{\alpha}_{\Delta t_{{l_{i}}}} = \boldsymbol{\Phi}^{-1} \left( \boldsymbol{\beta} - \mathbf{I}_{p} \right) \boldsymbol{\iota}, \quad \mathrm{and} $$
$$ \mathrm{vec} \left( \boldsymbol{\Psi}_{\Delta t_{{l_{i}}}} \right) = \left[ \left( \boldsymbol{\Phi} \otimes \mathbf{I}_{p} \right) + \left( \mathbf{I}_{p} \otimes \boldsymbol{\Phi} \right) \right] \left[ \exp \left( \left[ \left( \boldsymbol{\Phi} \otimes \mathbf{I}_{p} \right) + \left( \mathbf{I}_{p} \otimes \boldsymbol{\Phi} \right) \right] \Delta t \right) - \mathbf{I}_{p \times p} \right] \mathrm{vec} \left( \boldsymbol{\Sigma} \right) $$ where \(t\) denotes continuous-time processes that can be defined by any arbitrary time point, \(t_{l_{i}}\) the \(l^\mathrm{th}\) observed measurement occassion for individual \(i\), \(p\) the number of latent variables and \(\Delta t\) the time interval.
Harvey, A. C. (1990). Forecasting, structural time series models and the Kalman filter. Cambridge University Press. tools:::Rd_expr_doi("10.1017/cbo9781107049994")
Other Simulation of State Space Models Data Functions:
LinSDECovEta(),
LinSDECovY(),
LinSDEMeanEta(),
LinSDEMeanY(),
ProjectToHurwitz(),
ProjectToStability(),
SSMCovEta(),
SSMCovY(),
SSMMeanEta(),
SSMMeanY(),
SimAlphaN(),
SimBetaN(),
SimBetaN2(),
SimBetaNCovariate(),
SimCovDiagN(),
SimCovN(),
SimIotaN(),
SimNuN(),
SimPhiN(),
SimPhiN2(),
SimPhiNCovariate(),
SimSSMFixed(),
SimSSMIVary(),
SimSSMLinGrowth(),
SimSSMLinGrowthIVary(),
SimSSMLinSDEFixed(),
SimSSMLinSDEIVary(),
SimSSMOUFixed(),
SimSSMOUIVary(),
SimSSMVARFixed(),
SimSSMVARIVary(),
SpectralRadius(),
TestPhi(),
TestPhiHurwitz(),
TestStability(),
TestStationarity()
p <- 2
iota <- c(0.317, 0.230)
phi <- matrix(
data = c(
-0.10,
0.05,
0.05,
-0.10
),
nrow = p
)
sigma <- matrix(
data = c(
2.79,
0.06,
0.06,
3.27
),
nrow = p
)
sigma_l <- t(chol(sigma))
delta_t <- 0.10
LinSDE2SSM(
iota = iota,
phi = phi,
sigma_l = sigma_l,
delta_t = delta_t
)
Run the code above in your browser using DataLab