![]() |
In gretl parlance, a database is a (usually large) collection of series that may be of mixed frequencies and observation ranges. The data are stored in binary format, as single-precision "floats". You access such files via gretl's File/Databases menu. From there you can import selected series into gretl's workspace. Gretl databases have a .bin filename suffix, and are accompanied by an index file (suffix .idx) containing information on the series.
A gretl datafile, on the other hand, is a collection of series that is homogeneous with respect to frequency and observation range (though there may be missing values for some variables at some observations). Such a file may be read directly into gretl's workspace. Gretl datafiles typically have a .gdt suffix; by default they are in XML format, conforming to the Document Type Definition (DTD) given in gretldata.dtd.
For further details, please see the gretl manual.
The gretl distribution contains one sample database, a collection of US macroeconomic time series from the Federal Reserve Bank of St Louis. Several more databases are available for free downloading, or online access. Note that with gretl 0.40 and higher you can access these additional databases via the menu item File/Databases/On database server (provided you are connected to the internet).
Datasets (and in some cases replication scripts) are available for several popular econometrics textbooks, as shown in the table below. Please note that the .exe files are self-installers, for use on MS Windows only; the .tar.gz and .zip files are compressed archives that are usable on any operating system. Notes on installing the files can be found beneath the table.
Note that Lee Adkins offers additional material relating to Principles of Econometrics by Hill, Griffiths and Lim, including a free companion pdf book, Using gretl for Principles of Econometrics.
| Author | Title | Files |
|---|---|---|
Ramu Ramanathan |
Data and scripts supplied with gretl |
|
William Greene |
Selected data supplied with gretl |
|
Jeffrey Wooldridge |
||
Damodar Gujarati |
||
Stock and Watson |
stock_watson.exe
|
|
Christopher Dougherty |
||
Hill, Griffiths and Lim |
||
Marno Verbeek |
||
Davidson and MacKinnon |
||
Gary Koop |
With the Windows self-installers, just download them to the desktop then double-click on the installer icon. (Once the datasets are installed you can delete the installer.)
The compressed data packages should be unpacked in the gretl "data" directory. For example, if gretl is installed under /usr you could install the Stock and Watson data like this (as the root user):
cd /usr/share/gretl/data wget http://ricardo.ecn.wfu.edu/pub/gretl/stock_watson.tar.gz tar xvfz stock_watson.tar.gz rm stock_watson.tar.gz
The Stock and Watson scripts package should be unpacked in /usr/share/gretl/scripts (or the corresponding location if gretl is not installed under /usr).
| Source | Description | File |
|---|---|---|
Penn World Table, PWT56 (cross-country macro panel data) |
||
Jones-Obstfeld Saving and Investment Data for 13 Countries (historical panel) |
||
NBER-CES/Census Manufacturing Industry Productivity Data, June 2000 (covers over 400 industrial sectors) |
You should follow up the links in the first column above to get full details on these data sets. I am in the process of assembling my own notes on these packages; for the moment I have only done this for the Penn World Table.
PWT56 is a rich macroeconomic panel dataset, spanning 152 countries over the years 1950 to 1992. The package for gretl comprises three main data files:
pwt56.gdt: the entire pwt56. This dataset has many missing observations.
pwt56_60_89.gdt: A panel data set of 120 countries for the 30 years 1960-89, containing 20 variables. This data set has no missing observations.
pwt56_1985.gdt: More data are available for 1985 than for any other year, so I also made a pure cross-sectional data file for all 152 countries for this year. This file has some missing observations, but these will not be quite so difficult to deal with in a cross section as in a panel data set.
The package includes full documentation and sample scripts to analyse the data.
If you use gretl in your teaching you may wish to set up a custom collection of data files (or scripts) for your students to access. Look here for details.
Besides offering pre-packaged databases, gretl comes with some programs that can be used to create databases using data available via the internet. These can be found in the utils subdirectory of the gretl source package (see the gretl main page).