It includes natively all the basic statistical techniques employed in contemporary Econometrics and Time-Series Analysis. Additional estimators and tests are available via user-contributed function packages, which are written in hansl.[2]
gretl can output models as LaTeX files.
A review also appeared in the Journal of Statistical Software[7] in 2008. Since then, the journal has featured several articles in which gretl is used to implement various statistical techniques.
Supported data formats
gretl offers its own fully documented, XML-based data format.
Hansl is a Turing-complete, interpreted programming language, featuring loops, conditionals, user-defined functions and complex data structures.[8] It can be considered a domain-specific language for econometrics.[9] Like other scientifically oriented programming languages, such as MATLAB and Julia, matrices are supported natively as a primitive variable type.
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
Random Number Generation
Random Number Generation (RNG) in gretl has been examined and tested in Yalta & Schreiber (2012).[10] The authors conclude "Our results show that the RNG related procedures in gretl are implemented soundly and perform well in the three crush test suites of the TestU01".
Gretl as a teaching tool
Due to its libre nature and the breadth of econometric techniques it contains, gretl is widely used for teaching econometrics, from the undergraduate level onwards. Datasets in gretl format are available for several popular textbooks.
The following is a list of textbooks that use gretl as their software of choice:
Dougherty, Christopher Introduction to Econometrics (Oxford University Press)
Kufel, Tadeusz Ekonometria (Wydawnictwo Naukowe PWN); in Polish (Russian version also available)
Kivedal, Bjørnar Applied Statistics and Econometrics (Springer)
In addition, a free supplement[11] to Hill, Griffiths and Lim Principles of Econometrics (Wiley) is available.
^Baiocchi, Giovanni; Distaso, Walter (2003). "GRETL: Econometric software for the GNU generation". Journal of Applied Econometrics. 18: 105–110. CiteSeerX10.1.1.466.7942. doi:10.1002/jae.704.
^Mixon Jr, J. Wilson; Smith, Ryan J. (2006). "Teaching undergraduate econometrics with GRETL". Journal of Applied Econometrics. 21 (7): 1103–1107. doi:10.1002/jae.927.
^Tarassow, Artur (2019). "Practical Empirical Research Using gretl and hansl". Australian Economic Review. 52 (2): 255–271. doi:10.1111/1467-8462.12324. S2CID195431406.