# NOT RUN {
# Running all the below examples takes approximately 2 minutes.
# These examples use the data 'eurusd' which comes with the
# package, but in a scaled form (similar to Kalliovirta et al. 2016).
data(eurusd, package="gmvarkit")
data <- cbind(10*eurusd[,1], 100*eurusd[,2])
colnames(data) <- colnames(eurusd)
# GMVAR(1,2) model
fit12 <- fitGMVAR(data, p=1, M=2, ncalls=1, seeds=7)
fit12
profile_logliks(fit12)
# Structural GMVAR(1,2) model identified with sign
# constraints: model build based on inaccurate hand-given estimates.
W_122 <- matrix(c(1, 1, -1, 1), nrow=2)
params12s <- c(0.62, -0.13, 3.25, 7.92, 0.96, 0.09, -0.01, 1.01, 0.95, -0.04,
-0.02, 0.94, 1.31, 0.88, -0.16, 2.24, 4, 1.8, 0.79)
fit12s <- GMVAR(data, p=1, M=2, params=params12s,
structural_pars=list(W=W_122))
profile_logliks(fit12s)
# }
Run the code above in your browser using DataLab