How to simulate bivariate VAR(2) model ?

Hi @ArnoldHenry,

You have to construct a 2x4 matrix, which is basically you A1 and A2 together (or B1 and B2 depending on the notation). So you have to start with the first row 0.2, 0, -0.1, 0.1 and then the second row -0.3, 0.4, 0.2, -0.3 and fill byrow. There are other ways to fill a matrix but this is just an example. So the first 2x2 block is A1 and the second 2x2 block is your A2.

library(tsDyn)
A <- matrix(c(0.2, 0, -0.1, 0.1, -0.3, 0.4, 0.2, -0.3), byrow = TRUE, nrow = 2, ncol = 4)
A
#>      [,1] [,2] [,3] [,4]
#> [1,]  0.2  0.0 -0.1  0.1
#> [2,] -0.3  0.4  0.2 -0.3

var2 <- VAR.sim(B = A, lag = 2, include = "none", n = 100)
ts.plot(var2, type="l", col=c(1,2))