This page provides links to example programs for Time Series Analysis, by James D. Hamilton, (1994, Princeton University Press).
The Zip file listed first in the table below includes all the sample programs, data files (when available), and, in some cases, files containing RATS procedures used by the examples. If you want to actually run any of the examples, you should download the Zip file.
If you prefer just to view the code for a particular example, just click on the example name (the files are referenced by page number). Again, if you actually want to run these, you should download the zip file listed first to get the required data and procedure files.
Note that all of the textbook example, data, and procedure files currently available on our website are also included on the CD with the current release of the RATS software.
| File Name | Description |
| hamilton.zip | Zip file with all programs, data, procedure files |
| hamilton_Vers5.zip | Zip file with older versions of files (Version 5 compatible) |
| hamp005.prg | Graph examples for dynamic multipliers |
| hamp050.prg | Autocorrelation functions for ARMA processes |
| hamp055.prg | Graphs of realizations of AR(1) processes |
| hamp112.prg | Autocorrelation/partial autocorrelations of actual data |
| hamp167.prg | Spectral analysis |
| hamp410.prg | GMM |
| hamp448.prg | Fractional integration |
| hamp489.prg | Dickey-Fuller tests w/o serially correlated residuals |
| hamp511.prg | Phillips-Perron tests for unit roots |
| hamp528.prg | Augmented Dickey-Fuller tests |
| hamp582.prg | Cointegration: Regression based tests |
| hamp599.prg | Cointegration: Regression based tests of hypotheses |
| hamp647.prg | Cointegration:Likelihood based estimation and testing |
| hamp697.prg | Markov switching model |