LinSDE2SSM | R Documentation |
This function converts parameters from the linear stochastic differential equation model to state space model parameterization.
LinSDE2SSM(iota, phi, sigma_l, delta_t)
iota |
Numeric vector.
An unobserved term that is constant over time
( |
phi |
Numeric matrix.
The drift matrix
which represents the rate of change of the solution
in the absence of any random fluctuations
( |
sigma_l |
Numeric matrix.
Cholesky factorization ( |
delta_t |
Numeric.
Time interval
( |
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.
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}
.
Ivan Jacob Agaloos Pesigan
Harvey, A. C. (1990). Forecasting, structural time series models and the Kalman filter. Cambridge University Press. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1017/cbo9781107049994")}
Other Simulation of State Space Models Data Functions:
SimBetaN()
,
SimPhiN()
,
SimSSMFixed()
,
SimSSMIVary()
,
SimSSMLinGrowth()
,
SimSSMLinGrowthIVary()
,
SimSSMLinSDEFixed()
,
SimSSMLinSDEIVary()
,
SimSSMOUFixed()
,
SimSSMOUIVary()
,
SimSSMVARFixed()
,
SimSSMVARIVary()
,
TestPhi()
,
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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.