showClass("MixVARGaussian")
## Create array of covariance matrices
Sigma1 <- cbind(c(0.0013, 0.0011), c(0.0011, 0.0012))
Sigma2 <- cbind(c(0.0072, 0.0047), c(0.0047, 0.0039))
Sigma <- array(c(Sigma1, Sigma2), dim=c(2,2,2))
## Create list of AR coefficients
AR <- list()
AR[[1]] <- array(c(0.0973, -0.0499, 0.2927, 0.4256, ## VAR(2;4)
-0.0429, 0.0229, -0.1515, -0.1795,
-0.0837, -0.1060, -0.1530, 0.1947,
-0.1690, -0.0903, 0.1959, 0.0955), dim=c(2,2,4))
AR[[2]] <- array(c(0.3243, 0.2648, 0.4956, 0.2870, ## VAR(2;3)
-0.1488, 0.0454, -0.0593, -0.3629,
0.1314, 0.0274, 0.0637, 0.0485), dim=c(2,2,3))
## Create vector of mixing weights
prob <- c(0.6376, 0.3624)
## Create matrix of shift parameters
shift <- cbind(c(0.0044, 0.0020), c(-0.0039, -0.0014))
## Build "MixVARGaussian" model
new("MixVARGaussian", prob=prob, vcov=Sigma, arcoef=AR, shift=shift)
Run the code above in your browser using DataLab