# NOT RUN {
# specify VAR(2) model parameters
A1 <- matrix(c(-0.1, -0.3, 0, 0.5, 0, 0,
0, 0, -0.4, -0.1, -0.3, 0,
0.5, 0, 0, 0, 0, -0.4,
-0.1, -0.3, 0, 0.5, 0, 0,
0, 0, -0.4, -0.1, -0.3, 0,
0.5, 0, 0, 0, 0, -0.4), byrow=TRUE, ncol=6)
A2 <- matrix(c( 0, 0, 0.2, 0, 0.3, -0.7,
0, 0, 0, 0.4, 0, 0,
0, -0.3, 0, 0, 0, 0,
0, 0, 0.5, 0, 0.1, 0,
0, 0, 0, 0, 0.4, 0,
0, 0, 0, 0.4, 0, 0), byrow=TRUE, ncol=6)
P <- matrix(c( 2, 0, -0.5, 0.5, 0, 0.5,
0, 1, 0.5, 0.5, 0.5, 0,
-0.5, 0.5, 1, 0, 0, 0.5,
0.5, 0.5, 0, 1, 0, 0,
0, 0.5, 0, 0, 1, 0,
0.5, 0, 0.5, 0, 0, 1), byrow=TRUE, ncol=6)
# adjacency matrix of (global) conditional independencies.
graphVAR2(A1, A2, P, type="TSCG")
# }
Run the code above in your browser using DataLab