UNIT ROOTS AND COINTEGRATION

There are four program files: These are available together as a .zip file
/* December 1997 */

/* Programs: mgks.g, mgjoh.g, mgjoha.g, mgjohb.g         */
/* Authors: Michele Gambera with Kristin Strellec        */
/* The code is written and submitted for public, non-commercial use.  */
/* There are no performance guarantees.                  */
/* Please report bugs and suggestions to gambera@psu.edu */
/* Please acknowledge this code (and its authors)        */
/*  if you find it useful in your own work.              */

Hi,
and thanks for your interest in my programs.  Please let me know if you
have any suggestions or find any bugs.  When possible, I tested and
compared the results with EViews and obtained the same results (the
only difference is the way EViews normalizes the cointegration vectors).

Installation
Copy the four .g files to \gauss\src, and they will be available by just
calling them in a program (no need to include libraries).  In the DOS
version, they will even be available in the help (Alt-H-H-mgjoh will
display the file).

How to Use
The mgks.g routine is yet another Augmented-Dickey-Fuller unit root test.
The nice thing is that it chooses the number of lags optimally according
to Akaike or Schwarz.  The needed parameters are x (the data), maxlag
(the maximum number of lags to be tried, that is the program tries 1
lag of the dependent variable and records the values for Schwarz, Akaike,
and the ADF tests; then it does the same with 2 lags, and so on up to
maxlag; this idea is used also in mgjoh.g), and costante (the deterministic
part: 0 for no constant, 1 for constant, 2 for linear trend).
The other three routines carry out a large number of OLS regressions, thus
the output to screen is rather big.  I cleaned up the output that goes
to the output file, so you are better off if you declare an output file
and edit that one once you are done.
There are two possible procedures.  One is to take the deterministic
part as given (some authors suggest that one should use a linear trend
when modelling macroeconomic series, which means that an unconstrained
constant should be included in the vector error correction model---the
model is estimated in differences! A constant implies a trend in
levels---).  Therefore you can use mgjoh and optimally choose the lags
either with the Schwarz (which my advisor prefers) or with the Akaike
criterion (which tends to include some more lags).  Next, use mgjohb
and (given the lags and the number of cointegration vectors suggested
by mgjoh and given the assumed deterministic part) estimate the
cointegration vectors.
Second possible procedure: (1) use mgjoh with different deterministic
parts (no constant, constant, constant and trend) and see how many lags
and cointegration vectors you obtain with each one; (2) try the
different possibilities with mgjoha and see if they agree on which
deterministic part should be preferred; (3) estimate the cointegration
vectors with mgjohb using optimal parameters chosen by mgjoh and mgjoha.

Unresolved Issues
Sometimes the test in mgjoha yields negative results for the 2*
(constrained trend) null.  I haven't been able to find what the
cause is.  This is puzzling because it is a likelihood ratio test,
and a negative number suggests that including an unconstrained
trend REDUCES the likelihood function... Rather unbelievable.
Please take a look and let me know if you have any suggestions.
Feel free to send suggestions also about anything else!

References
Hamilton, James D. (1994), "Time Series Analysis", Princeton University
Press
Johansen, Soren (1995), "Likelihood-Based Inference in Cointegrated Vector
Autoregressive Models", Oxford University Press

Final Greeting
If you are in a department of Economics where I applied for a job, please
let the recruiting committee know! ;)

Michele Gambera
Dept. of Economics
The Pennsylvania State University
603 Kern Bldg.
University Park, PA 16802
USA
gambera@psu.edu
http://www6.la.psu.edu/~mgambera/mgamhome.htm