Skip to content

Code and Data

User’s Note

This is where you can find code and/or data sets that I’ve built for past research projects. This material is copyrighted; please feel free to use it for your non-profit research. Acknowledgements and citations to this work are warmly appreciated. This material is unsupported. Looking for something that you can’t find? Just e-mail me….I’ve probably overlooked it.

Real-Time Labour Productivity

Coming soon.

Data Revision

This is the code used to estimate the state-space models in Jacobs and van Norden (2011) Journal of Econometrics. It is far from easy to use (which is one of the reasons we’ve moved to use other code in subsequent research), but is posted here on a “as is” basis. The programs are in GAUSS and require the use of the TSM, the cmlmt and the TSAGauss applications. The latter is freely available, the others are copyrighted and available through Aptech (distributors of GAUSS.) cmlmt does constrained maximum-likelihood estimation, TSM does the Kalman filtering. However,

  • While robust, TSM has not been updated since the early 90s (the version we used was distributed on 3.5″ diskettes) and lacks computational advances such as those described in Durbin and Koopman.
  • Bayesian estimation has numerous advantages over maximum likelihood in richly-parameterized models

Output Gaps

Code for Output Gaps

This is a collection of RATS and GAUSS programs and utilities, as well as the real-time real output data from the FRB Philadelphia.

Real-Time US Output Gaps

These are the gaps that were used in Orphanides and van Norden (2002) and Orphanides and van Norden (2005) and have been sporadically updated since. The main database is in RATS data format. There is also a data file in a text format (I think its an old TROLL format) in case you have trouble finding something to read RATS.

Real-Time Canadian Output Gaps

These are the gaps and the code that were used in Cayen and van Norden (2005) and may have been updated since.

Switching Regressions

Code for switching regressions and Markov mixture models. The original documentation is van Norden and Vigfusson (1996) and the derivation of the analytic derivatives for Markov Switching Regressions was published in Gable, van Norden and Vigfusson (1997). The code was then extended somewhat for van Norden and Vigfusson (1998).  It was originally designed to run in GAUSS 4.0. It should work fine under more recent versions of GAUSS, with the possible exception of the external C code (I’m not sure whether the GAUSS foreign language interface has since changed.)

The code has a few nice features;

  • handles arbitrary numbers of explanatory variables in either regime.
  • fast estimation of state-independent (i.e. simple switching) models with arbitrary numbers of explanatory variables in either regime.
  • allows for time-varying Markovian transition probabilities with arbitrary numbers of explanatory variables in either regime.
  • time-varying regime classification and transition probabilities with arbitrary numbers of explanatory variables in either regime.
  • analytic derivatives
  • external C-code for speed increase in Markov models (don’t know whether this still works.)

HP Filter

I wrote GAUSS code for the Hodrick Prescott filter early on when I started working on output gaps.

Unit Roots and Cointegration

This is mostly RATS code written in the late 1980s and early 1990s. Estima has written much code since then. You should really think twice before using this code.

No comments yet

Leave a Reply

You must be logged in to post a comment.