Gretl in Research
Gretl in Research
2 165
Abstract
Today, quantitative models based on statistics are widely used and popular,
econometrics not excluding. In this field statistical models are used to quantify
economic problems, hence econometrics is considered as a strategic tool for
problem solving, decision-making or information management. Usually, the
quantification of these models is performed using computer. Therefore it is no
surprise that software selection is important in econometrics analysis. An open
source software Gretl seems to be a good choice. This paper deal with main
features of gretl, discussing its advantages too. Finally authors present the use
of this software in teaching of Econometrics subject at the Faculty of
Management Science and Informatics.
Keywords: gretl, statistical models, econometrics, teaching, gretl console,
1 INTRODUCTION TO GRETL
Gretl is an acronym for Gnu Regression, Econometrics and Time-series Library.
It is an open-source statistical software package with the main focus being on statistical
methods for econometric analyses. This software package, mainly for doing
econometrics, is easy to use and reasonably powerful.
Its origin is the Econometrics Software Library (ESL) package written by Ramu
Ramanathan, Professor Emeritus at the Economics Department, University of
California, San Diego, who later made it open source and handed it over to Professor
Allin Cottrell at the Department of Economics, Wake Forest University. After
releasing a few development versions the first stable version, gretl 1.0, was released to
the public on November 15, 2002. It is in continuous development, with the latest
version being 1.7.4, released on March 21, 2008.
Even though originally developed on Linux, gretl is now available also on
Microsoft Windows and Mac OS X. It is written in the C programming language and
available for free according to the GNU General Public License
166 Statistical Modeling in gretl and its Use in Teaching Econometrics
Gretl uses its own XML-based file format, but can import data from several other
file formats, including comma-separated values (CSV), ASCII, Open Document
Format (ODF) for spreadsheets, Microsoft Excel, Gnumeric, GNU Octave, EViews,
Stata and JMulTi. It can also export data to CSV, R, GNU Octave, JMulTi and PcGive
data formats.
Included in this software there is a large database which can be used as examples
and moreover additional data can be downloaded directly from the Gretl web site.
Figure 1 R started from inside gretl, with the currently active gretl
data set loaded into R
Across the top of the window you find the menu bar. From here you import
and manipulate data, analyze data, and manage output. At the bottom of the window is
the gretl toolbar. This contains a number of useful utilities that can be launched from
within gretl. Among other things, you can get to the gretl web site from here, open the
pdf version of the manual, or open the MS Windows calculator (very handy!). In figure
2 below is the main window in gretl.
If you want to execute a series of commands, you do this using scripts. Script
is a text file that contains commands. It is common to use a script file, instead of mouse
clicks as in the previous section. There are various advantages of using script file, but
the most important is that it enables you to reproduce the result from the original data
set. One of the great things about gretl is that it accumulates commands executed
singly from the console into a command log that can be run in its entirety at another
time. So, if you have completed an analysis that involves many sequential steps, the
script can be open and run in one step to get the desired result. The scripting language
includes matrix operations, loop constructs, boolean operators, user-defined functions,
and other features one should expect, besides commands for gretl's built-in statistical
methods.
5 CONCLUSION
Econometrics should be considered as a strategic tool whose teaching-learning
method should be designed paying special attention to competences as problem
solving, decision-making or information management. And since the election of
suitable software is a key point in the teaching learning process, econometrics not
excluding, we have experienced the potential of Gretl leading to satisfactory results for
both teachers and learners.
Though gretl can't be considered as a general-purpose statistical software (its
main functions are time series analysis, regression analysis and various econometric
tests), it is very useful mainly for econometricians and statisticians. In addition to that
the interaction with R with makes it a very powerful tool.
Journal of Information, Control and Management Systems, Vol. 10, (2012), No.2 171
REFERENCES
[1] Adkins, L. C. (2010). Using gretl for Principles of Econometrics, 3rd Edition,
available online at [www.learneconometrics.com/gretl/ebook.pdf]
[2] Adkins , L. C. (2006). Undergraduate Econometrics using GRETL,
Available online at
[http://www.learneconometrics.com/class/4213/gretl/ebook.pdf]
[3] Lukik, M., Slosiar, V. (2010). Zklady prce s ekonometrickm programom
GRETL, available online at
[http://www.fhi.sk/files/katedry/kove/veda-vyskum/prace/2010/Lukacik-
Slosiar2010.pdf]
[4] Prez, R., Lpez, A. J. (2009). Teaching and Learning Econometrics with Gretl
Summarizing Some Experiences, Chapter 12 in Econometrics with gretl.
Proceedings of the gretl Conference 2009, pp 191-201
[5] The gretl Team, Winston-Salem, NC (2008). Gretl 1.7.3., Journal of Statistical
Software, March 2008, Volume 25
[6] The homepage of gretl project [http://gretl.sourceforge.net]
[7] The Wikipedia webpage [http://en.wikipedia.org/wiki/Gretl]
172 Statistical Modeling in gretl and its Use in Teaching Econometrics