The home page of Structural VAR has moved to improve the service. Please follow the link to take you there.
You can download zip files with my code for estimating Common Trends and Markov Switching VAR models below. The common trends code was originally written for RATS version 3.x and it has been updated for RATS version 4.x by my good friend and colleague, Henrik Hansen, at the Department of Economics, University of Copenhagen. Both versions are available for download. The code for MSVARs, on the other hand, is written for GAUSS version 3.2.x and can be run on both the MS-DOS (16-bit) and Windows 9x/NT (32-bit) versions of GAUSS; it will probably also work for all operating systems that support GAUSS. If you find any bugs, please report them to me so that the code can be corrected. I've been told by Torsten Sloek that the msvar code does not run under GAUSS 3.6 for Windoze, but that it should run under GAUSS 4.0.
RATS 4 Code for Estimating A Common Trends Model
(latest release: 1/5/2000)
Download zip-file: ctmodel.zip (25 149 bytes)
The zip-file includes a total of 6 files. The main source code is found in the 3 procedures
. The remaining files are an example of a CT model specification file (
), a data file for the example (
), and a file describing the available options and their syntax for running a model specification file using the 3 procedures (
The CT model estimation code is found in
CT.SRC, while code for estimating asymptotic 95 percent confidence intervals for impulse response functions and standard errors for variance decompositions is given in the
CTAIR and the
CTAVD files, respectively. Note that these procedures must be run in the correct order:
CTAVD. Moreover, the program is not interactive, so any changes to the model can only be made in the CT model specification file.
A useful source on the theory behind CT modelling is "A Common Trends Model: Identification, Estimation and Inference", available for download from my Working Papers web page.
GAUSS Code for Estimating Markov Switching VAR Models
(latest release: 2/22/2002)
Download zip-file: msvar.zip (50604 bytes)
Download bz2-file: msvar.tar.bz2 (41561 bytes)
The zip/bz2-file includes 3 files in the top directory, 1 file in the subdirectory (
) and 11 procedures in the subdirectory (
). The main MSVAR program file is
, while the MSVAR model specification is handled by the
REGIME program is run from the GAUSS prompt. It calls the model specification file (where the data-file is also specified), prepares the data for ML estimation via the EM-algorithm, and calls the 10 procedures in the
PROGRAMS folder for execution of various tasks.
Typically, you should only have to edit the
SETUP.MOD file. However, the beta versions of GAUSS for 32-bit Windows seem to require that the absolute path is specified when a program calls external procedures. Hence, you may have to edit the
REGIME.PGM file prior to executing the code.
For additional information, please consult the
README(.TXT) and the
SETUP.MOD files. The latter file contains information on syntax, how to specify an MSVAR model, and information about various hypothesis tests. There are 9 basic model specifications, allowing you to restrict different aspects of the influence of the underlying Markov process on the VAR-model. In addition, you can include linear restrictions on all parameters except the transition probabilities, while restrictions on the transition probabilities are limited to (i) a serially uncorrelated process, and (ii) the process representing several independent 2-state processes (requires a minimum of 4 regimes).
Readme files are included in all packages and I advice you to read them before you attempt to run the code.
You may use the RATS and GAUSS code only if you accept the conditions that (1) Anders Warne (and Henrik Hansen whenever this applies) is not liable for any software or hardware problems you encounter that may be linked to using the code (i.e. you use it at your own risk); and (2) you must give Anders Warne (and Henrik Hansen) credit in your papers where the code has been used to obtain empirical results.
[YADA | Structural VAR | Software Code | TeXlips]
[Research Papers | Curriculum Vitae | Another Story | Feedback]
Last Updated: April 3, 2013