gretl

gretl
Screenshot of gretl
Developer(s) the gretl team
Initial release 31 January 2000 (2000-01-31)
Stable release
2018c / 3 September 2018 (2018-09-03)
Preview release
Through git
Repository Edit this at Wikidata
Written in C
Operating system Cross-platform
Available in Multilingual (11)
Type Statistical software
License GNU GPLv3
Website gretl.sourceforge.net

gretl is an open-source statistical package, mainly for econometrics. The name is an acronym for Gnu Regression, Econometrics and Time-series Library.

It has a graphical user interface (GUI) and can be used together with TRAMO/SEATS, R, Stata, Python, Octave, Ox and Julia. It is written in C, uses GTK+ as widget toolkit for creating its GUI, and uses gnuplot for generating graphs. As a complement to the GUI it also has a command-line interface.

gretl can output models as LaTeX files.

Besides English, gretl is also available in Albanian, Basque, Bulgarian, Catalan, Chinese, Czech, French, Galician, German, Greek, Italian, Polish, Portuguese (both varieties), Romanian, Russian, Spanish, Turkish and Ukrainian.

Gretl has been reviewed several times in the Journal of Applied Econometrics[1][2][3] and in the Journal of Statistical Software.[4]

Supported data formats

gretl offers its own fully documented, XML-based data format.

It can also import ASCII, CSV, databank, EViews, Excel, Gnumeric, GNU Octave, JMulTi, OpenDocument spreadsheets, PcGive, RATS 4, SAS xport, SPSS, and Stata files. It can export to Stata, GNU Octave, R, CSV, JMulTi, and PcGive file formats.

hansl

Gretl has its own scripting language, called hansl (which is a recursive acronym for Hansl's A Neat Scripting Language). It is an interpreted language, whose primary scope is to automate repetitive tasks and make it easy for econometricians, not necessarily professional code writers, to create functions and procedures implementing techniques not already present in gretl.

hansl is a fairly complete programming language, featuring loops, conditionals and complex data structures. Like other science-oriented programming languages, such as MATLAB and Julia, matrices are natively supported as a primitive variable type. The gretl add-ons known as function packages are typically written in hansl.[5]

Here's a simple example of hansl

matrix A = {1, 2 ; 3, 4}
matrix B = inv(A)
matrix C = A*B

print A B C

loop i=-3..3
    printf "Phi(%d) = %7.3f\n", i, cdf(N, i)
endloop

Running the above code produces

A (2 x 2)

  1   2 
  3   4

B (2 x 2)

    -2      1 
   1.5   -0.5

C (2 x 2)

      1.0000       0.0000 
  8.8818e-16       1.0000

Phi(-3) =   0.001
Phi(-2) =   0.023
Phi(-1) =   0.159
Phi( 0) =   0.500
Phi( 1) =   0.841
Phi( 2) =   0.977
Phi( 3) =   0.999

See also

References

  1. "GRETL: Econometric software for the GNU generation". Journal of Applied Econometrics. 18: 105–110. doi:10.1002/jae.704.
  2. "GRETL: 1.6.0 and its numerical accuracy".
  3. "Teaching undergraduate econometrics with GRETL". Journal of Applied Econometrics. 21: 1103–1107. doi:10.1002/jae.927.
  4. "gretl 1.7.3".
  5. "gretl function packages".
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.