Johansen test for cointegration - how to find model given test output? Suppose we are working with three I(1) variables and that the result below is the Johansen cointegration test:
Unrestricted Cointegration Rank Test (Trace)




Hypothesized No. of CE(s)
Eigenvalue
Trace statistic
0.05 critical value
Prob.**




None*
0.394297
59.23088
42.91525
0.0006


At most 1*
0.203773
20.12442
25.87211
0.2197


At most 2*
0.029684
2.350447
12.51798
0.9432




Answer:
a) According to this test, how many cointegration vectors are significant? Which model should we use? Explain your answer.
According to the test results, we reject the null of no cointegration vectors in favor of the alternative of at least one vector.  However, we do not reject either At most 1* or At most 2*, implying that the correct number of cointegration vectors to use is 1.
How can I decide which model using only this information? Does "model" mean using a trend, trend+constant, etc ?
b) What would the equations of this model be?
I have the same doubt; how would I model the equations based only on the test results?
Thanks a lot!
 A: a) According to this test, how many cointegration vectors are significant? Which model should we use? Explain your answer.
The Johansen rank test can be read as follows:
First line with NONE means, we are testing, if there are NONE or 0 cointegration relationships in the tested Vector Error Correction Model, known as VECM or sometimes only VEC. As you can see the first line is significant 0.0006 thus, we are rejecting H0, or in other words we are rejecting the hypothesis that there exists a conintegration relationship.
If we can reject the H0, you have to go to the next line with At most 1*. Then you do the test again, can we reject the H0? Now you have the hope that we have at least one relationship. If we unfortunately have to reject H0, you would go to the next line with  At most 2*, to check if we have then 2 cointegration relationships and so on. You read the Johansen-test line by line,

*

*until you hit a higher 0.05 critical value (25.87211) than Trace statistic (20.12442) that means you know the rank of your cointegration relationships in your VECM / Model, in your terms at least a rank of 1 although you are also able to use 2, but normally you would stop at the first H0 which is accepted (I use higher ranks only for genetic algorithm parameters if possible), because you already know everything a rank below is already true.


*OR you don't hit a higher critical value than the trace statistic, which would mean you would never cross the critical value, so you never accept H0 or in other terms that there is a cointegration relationship. In line 1 you can not reject H0 thus, you are accepting H0 which means, there is a cointegration relationship.
How can I decide which model using only this information? Does "model" mean using a trend, trend+constant, etc ?
To choose your model, you do something like a competition. You would calculate a VECM with trend, both or only constant and choose the one with a better AIC. This here is a source from the Vilnius University (Lithuania) (slide 61) http://web.vu.lt/mif/a.buteikis/wp-content/uploads/2020/05/Lecture_06.pdf that shows 5 competing cases of VECM with a certain amount of cointegration relationships.
b) What would the equations of this model be?
The model equation itself, is not so problematic. It is just a VAR with an error correction term that show us, when the time series gets back to its original state.
I'm not sure if you understand the fundamental part here, so let me help you, why a time series with cointegration relationships is not problematic. If a time series is stationary we measure a VAR in levels (no transformation just Vector Autoregressive Model).
If variables are not stationary, we check for cointegration relationships, that means variables have a unit root root (time series is not predictable) but if we increase lag and look more into the future they get back to their original state, in other terms, a shock to a time series does not harm its pathway in the long run, or in other words, it tends back to its level and is predictable (VECM your case)
If we have also no cointegration relationships, then we would transform the variables (log, differencing) to measure a VAR in differences.
THUS a VECM is nothing else than a simple VAR with just a factor that "corrects" the VAR/feature to show when the variable/s get back to its original state: YOu can also see that in the slides i linked for you on slide: 66.
Excerpt:
> ---------------------ECT---- Intercept-------Y1-1-------Y2-1---
> 
> Equation Y1 -0.6509582 1.767273 -0.06022577 0.1081974
> 
> Equation Y2 0.6502533 -1.276647 -0.05833625 0.1501910
> 
> ∆Y1,t = 1.767 − 0.65 · (Y1,t−1 − 1.88Y2,t−1 + 0.0371 · (t − 1)) 
> 
> ∆Y2,t = −1.277 + 0.65 · (Y2,t−1 − 1.88Y2,t−1 + 0.0371 · (t − 1))
> 
> Coefficient (α =) ECT = 0.65 is called an adjustment coefficient. It
> indicates that Y2 will return to equilibrium in 1/0.65 ∼ 2 steps,
> ceteris paribus

Thus all you have to do is take your lag, you have it already for the johansen test, write your formula of several equations from the VAR (just like in the sample) but instead of writing the ECT (which you dont know) set it to a variable/parameter. which has yet to be determined by the VECM. In this way you can show, that you know a VECM is nothing else than a VAR but it will be corrected THROUGH an ERROR CORRECTION TERM. And you have your final model/equation.
How does the ECT relates to the rank of the cointegration relationship matrix?
Amount of ranks r = amount of ECTs in the model. 1 Rank = 1 ECT.
If you have any further questions do not hesitate to ask me.
Further resource for VECM and Johansen in R:
https://www.r-econometrics.com/timeseries/vecintro/
