This page provides links to example programs for Basic Econometrics, by Damodar N. Gujarati, 4th Edition, (2003, McGraw-Hill).
Use the menu below to view the examples from a different textbook:
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 |
| gujarati.zip | Zip file with all programs, data, procedure files |
| gujarati_Vers5.zip | Zip file with older versions of files (Version 5 compatible) |
| gujarati_pre700.zip | Zip file with older versions of files (pre Version 7.0) |
| gujap168.prg | Regression through the origin |
| gujap172.prg | Effects of rescaling variables |
| gujap177.prg | Log-log regression |
| gujap180.prg | Log vs linear trends |
| gujap182.prg | Lin-log model, computing elasticities |
| gujap187.prg | Phillips' Curve, estimating NAIRU |
| gujap220.prg | Effects of transformations on R**2 |
| gujap223.prg | Cobb-Douglas production function |
| gujap227.prg | Polynomial regression |
| gujap269.prg | Testing coefficient restrictions |
| gujap272.prg | Testing exclusion restrictions |
| gujap275.prg | Chow test, test for equal variances |
| gujap281.prg | MacKinnon-White-Davidson (MWD) test for functional form |
| gujap291.prg | Dummy variables |
| gujap309.prg | Sample split dummies |
| gujap370.prg | Longley data, multicollinearity |
| gujap404.prg | Heteroscedasticity tests |
| gujap407.prg | Spearman's Rank Correlation test |
| gujap409.prg | Heteroscedasticity; Goldfeld-Quandt, Breusch-Pagan-Godfrey tests |
| gujap416.prg | Heteroscedasticity; weighted least squares |
| gujap422.prg | Heteroscedasticity tests |
| gujap423.prg | Heteroscedasticity tests |
| gujap462.prg | Serial correlation tests |
| gujap475.prg | Serial correlation induced by misspecification |
| gujap478.prg | Serially correlated errors; estimation |
| gujap511.prg | Omitted variables tests |
| gujap519.prg | Specification tests |
| gujap570.prg | Non-linear least squares |
| gujap571.prg | Non-linear least squares |
| gujap572.prg | Non-linear least squares |
| gujap587.prg | Linear probability model |
| gujap600.prg | Grouped logit, probit |
| gujap604.prg | Logit, probit |
| gujap641.prg | Panel data; fixed/random effects |
| gujap669.prg | Koyck distributed lag |
| gujap681.prg | Stock adjustment model |
| gujap686.prg | Dynamic regression model |
| gujap692.prg | Polynomial distributed lag |
| gujap699.prg | Granger causality tests |
| gujap767.prg | Indirect least squares |
| gujap775.prg | Two stage least squares |
| gujap779.prg | Klein's Model I |
| gujap795.prg | Graphs of macro data |
| gujap801.prg | Random walks |
| gujap804.prg | Examples of non-stationary vs trend stationary |
| gujap809.prg | ACF; non-stationary series |
| gujap811.prg | ACF; non-stationary series |
| gujap816.prg | Unit root tests |
| gujap823.prg | Cointegration tests |
| gujap825.prg | Error correction model |
| gujap826.prg | Unit root tests |
| gujap827.prg | Unit root tests |
| gujap828.prg | Unit root tests |
| gujap829.prg | Cointegration tests |
| gujap842.prg | ARIMA model |
| gujap848.prg | VAR |