?The following program written in TSP386 demonstrates the ?Johansen-Juselius ?procedure of cointegration analysis suggested in ? ?Johansen, Juselius (1990), Oxford Bulletin of Economics and Statistics ?Johansen, Juselius (1992), Journal of Econometrics ? ?For simplicity, the model contains only 3 variables (y1,y2,y3) and the ?lag of the VAR- System (in levels) is equal to 2. Furthermore, the constant is ?unrestricted. Although the file is written in the TSP386 syntax, it might ?be helpful for users of EViews as well. ? ? ?This part does the calculation of the Trace-Statistic, the estimation of ?the unrestricted cointegrating vectors and the corresponding matrix of ?feedback coefficients. ? d1y1 = y1-y1(-1); d1y2 = y2-y2(-1); d1y3 = y3-y3(-1); olsq d1y1 c d1y1(-1) d1y2(-1) d1y3(-1); e01 = @res; olsq d1y2 c d1y1(-1) d1y2(-1) d1y3(-1); e02 = @res; olsq d1y3 c d1y1(-1) d1y2(-1) d1y3(-1); e03 = @res; olsq y1(-1) c d1y1(-1) d1y2(-1) d1y3(-1); ek1 = @res; olsq y2(-1) c d1y1(-1) d1y2(-1) d1y3(-1); ek2 = @res; olsq y3(-1) c d1y1(-1) d1y2(-1) d1y3(-1); ek3 = @res; set t1 = @nob; mmake veo e01 e02 e03; mmake vek ek1 ek2 ek3; mat soo = veo'veo; mat sok = veo'vek; mat sko = vek'veo; mat skk = vek'vek; mat soo = soo/t1; mat sok = sok/t1; mat sko = sko/t1; mat skk = skk/t1; mat cho = chol(skk); mat chot = cho'; mat chotinv = chot"; mat sooinv = soo"; mat choinv = cho"; mat b = chotinv*sko*sooinv*sok*choinv; mform(type=sym) b; mat eigen = eigval(b); mat vec = eigvec(b); mat vectors = choinv*vec; mat loadings = sok*vectors; freq n; set n=3; smpl 1 n; unmake eigen eigs; unmake eigen eigens; sort (reverse) eigs; print eigs eigens vectors loadings; ll = log(1-eigs); set i=1; dot 0-2; smpl i n; msd ll; set lr. = -t1*@sum; set i=i+1; enddot; print lr0 lr1 lr2;