This function converts vector autoregressive (VAR) parameters to continuous-time vector autoregressive (CTVAR) parameters using the VAR to SVAR transformation in Table 1, block D, and the SVAR to CTVAR transformation in Table 1, block C, of Chow et al. (2023).
Arguments
- alpha
Numeric vector. Vector of constant values for the dynamic model (\(\boldsymbol{\alpha}\)).
- beta
List. A list of numeric matrices containing the VAR transition matrices \(\boldsymbol{\beta}_1, \ldots, \boldsymbol{\beta}_p\).
- psi_l
Numeric matrix. Cholesky factorization (
t(chol(psi))) of the covariance matrix of the process noise (\(\boldsymbol{\Psi}\)).- delta_t
Numeric. Time interval.
Details
Let \(p\) be the VAR order and let \(\boldsymbol{\beta}_p\) be the final VAR lag matrix. The VAR to SVAR transformation uses $$ M = I - \boldsymbol{\beta}_0^{\ast} = (-1)^{p + 1} \Delta t^{-p} \boldsymbol{\beta}_p^{-1} $$
The SVAR parameters are then $$ \boldsymbol{\alpha}^{\ast} = M\boldsymbol{\alpha}, \quad \boldsymbol{\beta}_0^{\ast} = I - M, \quad \boldsymbol{\beta}_j^{\ast} = M\boldsymbol{\beta}_j, \quad j = 1, \ldots, p, $$ and $$ \boldsymbol{\Psi}^{\ast} = M\boldsymbol{\Psi}M'. $$
The SVAR to CTVAR transformation solves for \(S_0, \ldots, S_{p - 1}\) using $$ \boldsymbol{\beta}_0^{\ast} = I + \sum_{m = 0}^{p} S_m \Delta t^{-m} $$ and $$ \boldsymbol{\beta}_j^{\ast} = (-1)^j \sum_{m = j}^{p} {m \choose j} S_m \Delta t^{-m}, \quad j = 1, \ldots, p, $$ where \(S_p = -I\).
The returned parameters use the linear SDE notation in
simStateSpace:
iota, phi, and sigma_l.
References
Chow, S.-M., Losardo, D., Park, J. J., & Molenaar, P. C. M. (2023). Continuous-time dynamic models: Connections to structural equation models and other discrete-time models. In R. H. Hoyle (Ed.), Handbook of structural equation modeling (2nd ed.). The Guilford Press.
See also
Other Simulation of State Space Models Data Functions:
LinSDE2SSM(),
LinSDECovEta(),
LinSDECovY(),
LinSDEInterceptEta(),
LinSDEInterceptY(),
LinSDEMeanEta(),
LinSDEMeanY(),
ProjectToHurwitz(),
ProjectToStability(),
SSMCovEta(),
SSMCovY(),
SSMInterceptEta(),
SSMInterceptY(),
SSMMeanEta(),
SSMMeanY(),
SVAR2CTVAR(),
SimAlphaN(),
SimBetaN(),
SimBetaN2(),
SimBetaNCovariate(),
SimCovDiagN(),
SimCovN(),
SimIotaN(),
SimMVN(),
SimMuN(),
SimNuN(),
SimPhiN(),
SimPhiN2(),
SimPhiNCovariate(),
SimSSMFixed(),
SimSSMIVary(),
SimSSMLinGrowth(),
SimSSMLinGrowthIVary(),
SimSSMLinSDEFixed(),
SimSSMLinSDEIVary(),
SimSSMOUFixed(),
SimSSMOUIVary(),
SimSSMVARFixed(),
SimSSMVARIVary(),
SpectralRadius(),
TestPhi(),
TestPhiHurwitz(),
TestStability(),
TestStationarity(),
VAR2SVAR()
Examples
# Example 1: VAR(1) to CTVAR(1)
alpha <- c(0.20, -0.10)
beta <- list(
matrix(
data = c(
0.90, 0.05,
0.05, 0.90
),
nrow = 2
)
)
psi <- matrix(
data = c(
1.00, 0.20,
0.20, 0.80
),
nrow = 2
)
psi_l <- t(chol(psi))
out <- VAR2CTVAR(
alpha = alpha,
beta = beta,
psi_l = psi_l,
delta_t = 1.0
)
out$iota
#> [,1]
#> [1,] 0.2291022
#> [2,] -0.1238390
out$phi
#> [,1] [,2]
#> [1,] -0.1145511 0.0619195
#> [2,] 0.0619195 -0.1145511
out$sigma_l
#> [,1] [,2]
#> [1,] 1.1034883 0.0000000
#> [2,] 0.1132674 0.9783552
# Example 2: VAR(2) to CTVAR(2)
alpha <- c(0.10, 0.05)
beta <- list(
matrix(
data = c(
0.50, 0.10,
0.05, 0.40
),
nrow = 2
),
matrix(
data = c(
-0.20, 0.05,
0.03, -0.15
),
nrow = 2
)
)
psi <- matrix(
data = c(
0.70, 0.10,
0.10, 0.60
),
nrow = 2
)
psi_l <- t(chol(psi))
out <- VAR2CTVAR(
alpha = alpha,
beta = beta,
psi_l = psi_l,
delta_t = 1.0
)
out$iota
#> [,1]
#> [1,] 0.0000000
#> [2,] 0.0000000
#> [3,] 0.5789474
#> [4,] 0.5263158
out$phi
#> [,1] [,2] [,3] [,4]
#> [1,] 0.0000000 0.0000000 1.0000000 0.0000000
#> [2,] 0.0000000 0.0000000 0.0000000 1.0000000
#> [3,] -3.5263158 -0.3684211 -0.7368421 -0.6842105
#> [4,] -0.1754386 -5.1228070 -1.5789474 -0.8947368
out$sigma_l
#> [,1] [,2] [,3] [,4]
#> [1,] 0 0 0.000000 0.000000
#> [2,] 0 0 0.000000 0.000000
#> [3,] 0 0 4.600373 0.000000
#> [4,] 0 0 3.211430 4.883756
# For a bivariate CTVAR(2), the companion-form state
# has dimension 4 by 4.
dim(out$phi)
#> [1] 4 4
# Example 3: VAR(2) with zero intercept and zero innovation covariance
alpha <- c(0.00, 0.00)
beta <- list(
matrix(
data = c(
0.40, 0.05,
0.02, 0.30
),
nrow = 2
),
matrix(
data = c(
-0.25, 0.04,
0.01, -0.20
),
nrow = 2
)
)
psi_l <- matrix(
data = 0.0,
nrow = 2,
ncol = 2
)
out <- VAR2CTVAR(
alpha = alpha,
beta = beta,
psi_l = psi_l,
delta_t = 1.0
)
out$iota
#> [,1]
#> [1,] 0
#> [2,] 0
#> [3,] 0
#> [4,] 0
out$phi
#> [,1] [,2] [,3] [,4]
#> [1,] 0.0000000 0.00000000 1.0000000 0.0000000
#> [2,] 0.0000000 0.00000000 0.0000000 1.0000000
#> [3,] -3.4092742 -0.06048387 0.3770161 -0.1411290
#> [4,] -0.2318548 -4.51209677 -0.5745968 0.4717742
out$sigma_l
#> [,1] [,2] [,3] [,4]
#> [1,] 0 0 0 0
#> [2,] 0 0 0 0
#> [3,] 0 0 0 0
#> [4,] 0 0 0 0