This page provides links to example programs for Econometric Methods, by Johnston and DiNardo, 4th Edition (1996, McGraw-Hill/Irwin).
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 |
| johnston.zip | Zip file with all programs, data, procedure files |
| johnston_pre610.zip | Zip file with older versions of files (pre Version 6.10) |
| johnston_pre700.zip | Zip file with older versions of files (pre Version 7.0) |
| johnp002.prg | Graphics: time series, X-Y |
| johnp004.prg | Graphics: arrays of graphs |
| johnp034.prg | Simple regressions |
| johnp049.prg | Regressions with various functional forms |
| johnp059.prg | Stationary, unit root, explosive series |
| johnp075.prg | Multiple regressions by matrix operations |
| johnp121.prg | Stability tests, Chow tests, recursive least squares |
| johnp165.prg | Monte Carlo: OLS vs GLS |
| johnp172.prg | Heteroscedasticity tests: White, Breusch-Pagan-Godfrey, Goldfeld-Q |
| johnp193.prg | Autocorrelation: h and Breusch-Godfrey tests, common factor restri |
| johnp216.prg | ACF |
| johnp235.prg | ACF for seasonal series |
| johnp236.prg | Seasonal ARIMA model: fitting and forecasting |
| johnp265.prg | ARDL model |
| johnp270.prg | ARDL model; specification tests |
| johnp303.prg | Cointegration: maximum likelihood analysis |
| johnp351.prg | Monte Carlo: small sample bias |
| johnp359.prg | Bootstrapping: linear regression |
| johnp365.prg | Monte Carlo: confidence interval |
| johnp371.prg | Kernel density estimators |
| johnp376.prg | Probit model; kernel density estimators |
| johnp381.prg | Non-parametric regressions |
| johnp415.prg | Logit, probit models; analysis of fitted values |