How to put table data in Vector Error Correction Form using Matrices?

Good day everyone. I would like to perform the johansen cointegration test on the two time series below. I know the procedure will probably involve performing regression of a variable onto another one. I already know how to perform OLS using matrix algebra. I want to learn the concept of the VECM and the johansen test, and not just how to use a software that does it for me because I already know these tools exist. I would like do it manually by using matrices, I don't mind the tedious calculations but I need to know what I am doing is correct.


I guess I should start with putting the data in the equation form of VAR(3)




I am not sure if I am on the right path.
Last edited: