This directory contains data and programs for the paper Neil R. Ericsson and James G. MacKinnon (2002) "Distributions of Error Correction Tests for Cointegration", Econometrics Journal, 5, 285--318. All programs and data are copyright by the authors. They may be used freely for non-commercial purposes, provided proper attribution is given; please cite the paper in all publications. However, no part of them may be incorporated in any form into any non-free publication or non-free computer program without the express, written consent of the authors. There are two ways to obtain P values. One is to use a spreadsheet, and other is to use a Fortran program, which needs to read a number of data files. There are two spreadsheet files, ecmtest.xls and ecmtestu.xls. The difference between the two files is that the former is encrypted, all data and formulas being protected, and the latter is not. Both spreadsheets should work with recent versions of Excel, and we recommend using ecmtest.xls because it prevents the user from accidentally corrupting the file. However, for users of spreadsheets other than Excel, it is possible that ecmtestu.xls will work when ecmtest.xls does not. The data files used by the Fortran program have been zipped to save space and bandwidth. They are in the zip file ecmtabs.zip. The files in this zip file are in Unix format, with only LF at the ends of lines. Users of Windows, DOS, or OS/2 will need to replace LF with CR/LF pairs. This can probably be done by the unzipping program. On a Unix system, it is recommended that these files be put in /usr/local/urcdist. Non-Unix users will have decide where to put them. The program ecmdist.f is written in Fortran 77. It should be compilable on any system with a Fortran compiler that is not grossly out of date. On a typical Unix system, the command f77 -O ecmdist.f -o ecmdist will compile the program and create an executable file called ecmdist; the compiler may be called g77, fort77, or something else instead of f77. Users of non-Unix systems will have to change the default location for the .tab files before compiling. For the benefit of PC users who do not have access to a Fortran compiler, an executable file, ecmdist.exe (which is zipped in ecmdist.zip), is also provided. It requires a modern computer running Windows. Precisely versions of Windows it works on, I do not know, since I never run Windows myself. It was compiled using G95 on a machine running Windows 7. The default location for the .tab files is C:\URCDIST. The ecmdist program searches for the .tab files in the current directory and in the default location. If it cannot find these files, it will stop. For those who wish to incorporate these routines into their own programs, a separate file called ecmrouts.f is provided. Your program must call the routine ecmval with the correct arguments; see the file itself for documentation. This routine will read the necessary .tab files and call other routines as needed. July 19, 2010