Yes - agreed.
I have attempted to recover the coefficients from the DGP, but I do not understand how the output from JOHMLE relates to those. I'll accept
and presumably when the rank=1 there is only 1 unique cointegrating vector?
JOHMLE correctly identifies from the trace tests 2 ECT's i.e. rank=2, but how via the output are the equilibrium errors (x+y-z) and (x-y) related to the cointegrating vectors, and related to the ECT's?
Why are the coefficients from SYSTEM not similar to those in the DGP?
Please explain further...TomDoan wrote: ↑Thu Apr 18, 2024 7:10 am The procedure gives a full breakdown of the PI matrix. You have to determine the rank and determine what the cointegrating space is from there. For forecasting or any related purposes, it doesn't matter how you normalize multiple cointegrating vectors---whatever you might do to the betas is washed out by the inverse transformation in the alphas.
Here's the complete code:
Code: Select all
*===============================
seed 1
all 500
clear(zeros) x y z
frml xeq x = x{1}+.1*(x{1}-x{2})-.2*(y{1}-y{2})-.2*(z{1}-z{2})-.05*(x{1}+y{1}-z{1})-.001*(x{1}-y{1})
frml yeq y = y{1}-.2*(x{1}-x{2})+.4*(y{1}-y{2})-.1*(z{1}-z{2})+.001*(x{1}+y{1}-z{1})+.5*(x{1}-y{1})
frml zeq z = z{1}-.1*(x{1}-x{2})+.1*(y{1}-y{2})+.1*(z{1}-z{2})+.01*(x{1}+y{1}-z{1})-.001*(x{1}-y{1})
group xyzcoint xeq>>x yeq>>y zeq>>z
compute [symm] sigma=||1.0|0.5,1.0|0.5,0.5,1.0||
disp sigma
simulate(cv=sigma,model=xyzcoint,from=3,steps=498)
prin / x y z
*===============================
* Dickey-Fuller tests
@dfunit(det=constant) x
@dfunit(det=constant,maxlags=6,method=gtos) x
@dfunit(det=constant,maxlags=6,method=aic) x
@dfunit(det=constant) y
@dfunit(det=constant,maxlags=6,method=gtos) y
@dfunit(det=constant,maxlags=6,method=aic) y
@dfunit(det=constant) z
@dfunit(det=constant,maxlags=6,method=gtos) z
@dfunit(det=constant,maxlags=6,method=aic) z
*===============================
set eqerr = x + y - z
@dfunit(det=constant) eqerr
@dfunit(det=constant,maxlags=6,method=gtos) eqerr
@dfunit(det=constant,maxlags=6,method=aic) eqerr
spgraph(header='',hfields=2,vfields=1)
graph(header="Non Stationary Series",key=upright) 3
# x 101 500
# y 101 500
# z 101 500
graph(header="Equilibrium error: x(t)+y(t)-z(t) ~ I(0)") 1
# eqerr 101 500
spgraph(done)
set eqerr = x - y
@dfunit(det=constant) eqerr
@dfunit(det=constant,maxlags=6,method=gtos) eqerr
@dfunit(det=constant,maxlags=6,method=aic) eqerr
spgraph(header='',hfields=2,vfields=1)
graph(header="Non Stationary Series",key=upright) 3
# x 101 500
# y 101 500
# z 101 500
graph(header="Equilibrium error: x(t)-y(t) ~ I(0)") 1
# eqerr 101 500
spgraph(done)
*===============================
@johmle(LAGS=1,DET=constant,NOSEASONAL,ECT=ecteqns,CV=cvectors,VECTORS=evectors,EIGENVALUES=evalues,$
DUALVECTORS=dualvec,LOADINGS=loadings,TRACETESTS=tracetests,PRINT) 101 500
# x y z
disp "CV:" cvectors; * ML estimator for a single cointegrating vector
disp "VECTORS:" evectors; * beta's
disp "EIGENVALUES:" evalues; * eigenvalues
disp "DUALVECTORS:" dualvec; * dualvec
disp "LOADINGS:" loadings; * alpha's
disp "TRACETESTS:" tracetests; * tracetests
equation(coeffs=%xcol(evectors,1)) ect1 *
# x y z
equation(coeffs=%xcol(evectors,2)) ect2 *
# x y z
equation(coeffs=%xcol(evectors,3)) ect3 *
# x y z
set ect_1 = %eqnprj(ect1,t); * compute projected values of an equation. Returns the projected (fitted) value of equation at time period t
set ect_2 = %eqnprj(ect2,t); * compute projected values of an equation. Returns the projected (fitted) value of equation at time period t
set ect_3 = %eqnprj(ect3,t); * compute projected values of an equation. Returns the projected (fitted) value of equation at time period t
spgraph(header='ECT',hfields=2,vfields=2)
graph(header="ect_1") 1
# ect_1 101 500
graph(header="ect_2") 1
# ect_2 101 500
graph(header="ect_3") 1
# ect_3 101 500
spgraph(done)
system(model=ectmodel)
variables x y z
lags 1 to 2
ect ect1 ect2
end(system)
estimate(residuals=resids,noftests) 101 500