# NOT RUN {
## These are long running examples that use parallel computing!
## The below examples take about 30 seconds to run.
# These examples use the data 'eurusd' which comes with the
# package, but in a scaled form.
data <- cbind(10*eurusd[,1], 100*eurusd[,2])
colnames(data) <- colnames(eurusd)
# GMVAR(1,2) model with default settings
fit12 <- fitGMVAR(data, p=1, M=2, ncalls=1, seeds=7)
qrtests12 <- quantile_residual_tests(fit12)
qrtests12
plot(qrtests12)
# Structural GMVAR(1,2) model identified with sign
# constraints and build with hand-specified parameter values.
# Tests based on simulation procedure with nsimu=1000:
W_122 <- matrix(c(1, 1, -1, 1), nrow=2)
params12s <- c(0.624, -0.127, 3.248, 7.916, 0.959, 0.089, -0.006, 1.006,
0.952, -0.037, -0.019, 0.943, 1.312, 0.879, -0.155, 2.243, 3.997,
1.798, 0.788)
fit12s <- GMVAR(data, p=1, M=2, params=params12s,
structural_pars=list(W=W_122))
qrtests12s <- quantile_residual_tests(fit12s, nsimu=1000)
qrtests12s
# }
Run the code above in your browser using DataLab