Sven Schreiber's software page

(Diese Seite ist nur auf Englisch verfügbar. Direkt zu Sven Schreibers Hauptseite: hier. / This page is available only in English. Directly to Sven Schreiber's home page: here.)

(Latest update: March 2019)

Stuff for gretl

The gretl econometrics/statistics open-source software is lightweight yet powerful, including a data-handling and matrix programming language "hansl" (= HANdy Scripting Language).

See also:

Some of my packages

I have authored or co-authored a growing number of contributed function packages for Gretl. I am just listing them here without the actual code, because these packages are available from within the running Gretl program via the menu path Tools/Function packages/On Server...

PTconf

The companion package to my paper "The estimation uncertainty of permanent-transitory decompositions in cointegrated systems". (Please cite if you use it in research.)

SVAR

This package is actually a Gretl "add-on" which is automatically installed, look under Model/Time Series/Multivariate/Structural VARs... For example, this SVAR add-in for Gretl was able to combine long-run and short-run restrictions long before this possibility appeared in a recent Eviews version. (But of course there's still lots of things to be done...) The main author is Jack Lucchetti who was kind enough to take me on board.

BreitungCandelonTest

Performs a frequency-wise Granger (non-) causality test as described in Breitung and Candelon (2006): "Testing for short- and long-run causality: A frequency-domain approach", Journal of Econometrics, 132, pp. 363-378. Recent versions also incorporate extensions from the paper Breitung, Jörg, and Schreiber, Sven (2018): "Assessing Causality and Delay within a Frequency Band", see my research page. Please cite if you use it in research.

delayspectral

Calculates signal delays in frequency domain and their uncertainty. It is based on the same paper, Breitung and Schreiber (2018). (And again, please cite if you use it in research.)

johansensmall

Gretl has become one of the best packages for doing cointegration analysis. This package supplies Bartlett corrected trace test statistics and especially performs a bootstrap of the original Johansen trace test, which is especially useful in small samples, hence the new name johansensmall. Andreas Noack Jensen started the whole work, and recently I have much refined the bootstrap (for references see the help text inside the package).

coint2rec

One more for doing cointegration analysis: This package provides two (or three) stability tests for the cointegrated vector autoregressive model based on recursive estimation. The package also includes the function nyblom to simulate critical values of the test statistic for beta constancy. Andreas Noack Jensen did most of the work, I added the joint eigenvalue test, finished the function package build and resolved some gretl-related details.

StrucBreak

A port of the Bai-Perron structural break test/estimate approach from Ox code by Jack Lucchetti and Giulio Palomba to Gretl. A proper GUI interface is still missing.

FEP

Stands for "Forecast Evaluation Package", joint with Artur Tarassow. Provides several functions and evaluation approaches, including asymmetric loss functions. Can be used in a menu driven way.

uniFCextensions

Performs an interval forecast (non-parametric/bootstrapped), and a point forecast for the (asymmetric) lin-lin loss function.

ridge

Guess what, provides the ridge estimator.

BoxCoxFuncForm

Determines the best fitting Box-Cox transformations (including linear and log) in a regression model. Joint with Jürgen Malitte, with whom I have co-authored the German introductory textbook on econometrics with gretl.

CommonTrendsTest

Implements the multivariate generalization of the KPSS test for common stochastic (I(1)) trends by Nyblom and Harvey and some extensions for breaks by Busetti.

CSDpanel

Provides some tools for panel models with cross-sectional dependence, testing and estimation. Joint with panel guru Jörg Breitung.

Friedman

A little package to provide the non-parametric c-sample Friedman test (and the Quade variant).

MannKendall

Another package in the non-parametric department. (Trend test.) Joint with Jack Lucchetti.

lomackinlay

To apply the variance ratio test by, guess who, Lo and MacKinlay. Joint with gretl founder Allin Cottrell.

parallel_specs

A package that provides a hansl-based framework to easily run your code in parallel on multiple CPU cores, if you want to run it for different specifications which only differ by a small number of parameters, say the lag order or a penalization choice or something like that. Again joint with Allin Cottrell.

staticfactor

Static factor analysis, including but not limited to principal components. Joint with Jack Lucchetti.

StrucTiSM

Stands for Structural Time Series Models, "Harvey style". Estimates some popular models of this class.

Work in progress

A package to automatically translate numerically intensive functions written in simplified hansl to Julia code to benefit from JIT compilation on-the-fly while only using hansl.


NumPy stuff (NumPy: numerical Python extension)

QZ decomposition

Since 2011 or 2012 and version 0.11.0, SciPy includes this decomposition for a pair of matrices (experts call it a pencil it seems...) as its native function scipy.linalg.qz, making my own workaround wrapper obsolete. I'm leaving my code linked on this page anyway, for reference. (The QZ decomposition is used for solving rational-expectations models, as in Uhlig's toolkit or similar software like Dynare.)
After discovering the great capabilities of the 'ctypes' Python module and its nice integration with numpy, I wrote a wrapper for the relevant Lapack functions, real and complex. If you download the qz.py module, you only need to do a 'from qz import qz', and then the provided qz()-function should work natively in numpy exactly as it would in Matlab (which also uses Lapack for the calculation). However, you need a precompiled shared Lapack library (.dll or .so or whatever) installed on your system; see the embedded documentation in the docstrings of the module for more information.

Co-breaking analysis

There is some NumPy/SciPy code to test for and estimate co-breaking relationships as in my paper on co-breaking (linked on the research page in the entry for this paper).


Various recommendations of free (scientific) software

All I can say is that I use the programs myself regularly, so many thanks to the respective developers for all their work!