# Replication of some of the results on Danish macro
# data in S. Johansen, "Likelihood-Based Inference in
# Cointegrated Vector Auto-Regressive Models" (Oxford,
# 1995), chapter 7.

open denmark.gdt

# determination of the cointegration rank
coint2 2 LRM LRY IBO IDE --rc --seasonals

# estimation of the vector EC model
vecm 2 1 LRM LRY IBO IDE --rc --seasonals

# retrieve the cointegration vector and the loadings
matrix alpha = $jalpha
matrix beta = $jbeta
matrix Pi = alpha*beta'

print "Restricted long-run matrix"
Pi
