The Code and Data Library:

Your guide to a variety of programming tools.

Usage   Bugs Links   Acknowledgements

List of Code and Data Archives Available

Description

Environment

Download

Real Time Output Gaps RATS 5.0 & GAUSS 5.0 rtgaps.zip
Switch GAUSS 4.0 swvv.zip
UnitRoot RATS 4.0 unitroot.zip
HPFilter GAUSS 3.0 HPFilter.zip
Graphics GAUSS 3.0 Graphics.zip


Output Gaps:

Contains a large RATS data file storing rolling estimates of US output gaps constructed using real-time data and various detrending methods. Also contains the programs and raw data used to construct the output gaps. Back to the top


Switch:

This is the most up-to-date version of the switching regression procedures built by myself and Robert Vigfusson with help from Jeff Gable. If you're not familiar with them, they let you estimate a general class of regime-switching models along the lines of those described in James Hamilton's textbook. Key features and limitations of the code include: The original version was documented as Bank of Canada Working Paper 96-3 and is still available from the Bank's web site.  The latest version available here accompanies the paper "Avoiding the Pitfalls..." by van Norden and Vigfusson (SNDE 1998.) Differences in the latest version include: No, we still haven't done the EM algorithm for Markov models with non-constant transition probabilities.

Back to the top


UnitRoot:

A slew of RATS procedures programmed by myself and Robert Amano at the Bank of Canada in the early 1990s as the Hendry general-to-specific methodology and new cointegration tests started to work their way into the mainstream.  Originally programmed in RATS 3.0, then ported to 4.0.  I haven't looked at this stuff in years; it has been duplicated very nicely by commercial packages (I like COINT for GAUSS by Ouliaris & Phillips for most of  my unit-root and cointegration needs.)

Key features include

Back to the top 
HPFilter:

A GAUSS procedure that HP-filters* data. Coding this efficiently requires the banded matrix functions that were added to GAUSS in the last few years.  For those who have older versions of GAUSS, a slower but more widely-compatable version of the proc is also included.
Back to the top

Graphics:

A collection of handy things for GAUSS's clean, versatile and user-hostile PQG graphics. Back to the top

Usage:

All these procedures are protected by copyright. You are free to use these procedures as you like, but I ask that you acknowledge their use in any published work. You may distribute them provided that you do not alter them in any way and that no fee of any kind is charged for them and they are not included as part of any commercial product.
Back to the top


Bugs:

I and many colleagues have used these procedures, but there is no guarantee as to their accuracy or reliablity.  They are free and you get at least as much as what you pay for.  I do try to keep track of known bugs and may try to fix them. Feel free to report bugs; concise and simple code illustrating the bug is more likely to be acted upon.  Some of these procs may be for older versions of the software - please do not mail me asking for updated versions. In most cases, there are now updated alternatives available from other sources.
Back to the top

Links:

I will include some links to other useful depositories of econometric computer code. If you would like me to include a link to your code library, please drop me a line.
Back to the top

Acknowledgements:

I've contributed substantially to all of these, but many depended on collaboration with others. I've tried to note authorship on all the procs, but special thanks go out to Robert Amano and Robert Vigfusson.
Back to the top 
*Why anyone would want to use the HP filter is another question entirely, but don't get me started!  My providing the procedure does not constitute an endorsement of this methodology. Yes, I know that it is not properly attributed to Hodrick and Prescott and that the method dates back to the stats literature of the 1920s.