Mugshot

Grocer: an econometric toolbox for Scilab

(Painting by Marion Dubois: thanks Marion! for more pictures see Marion's web page )

What is grocer? / Grocer capabilities / Download / What's new / Grocer citations /e-mail / Additional Grocer and Scilab material / Home

What is Grocer?

Grocer is the econometric toolbox for Scilab, a matrix-oriented software similar to Gauss and Matlab, that I have developed, first alone and since 2005 with Emmnanuel Michaux. The current version works with Scilab versions until the 4.1.2 and from the 5.2.0 (the versions in between being inferior both to the 4.1.2 and the most recent versions, I do not maintain Grocer anymore for these Scilab versions: if for any reason, you nevertheless need it, e-mail me and I will then restore Grocer for these versions).
Like Scilab, Grocer is free and open source.

Grocer Capabilities:

- ordinary least squares and various single equation methods (autocorrelated models, instrumental variables, non linear least squares, robust methods, quantile regression...)
- basic estimation with limited dependent variables: ordered logit and probit (with 2 or more variables); tobit; multivariate logit
- specification tests (multicollinearity, autocorrelation, heteroskedasticity, normality, predictive failure,...)
- simultaneous equations methods (SUR, two and three stage least squares,...)
- VAR, VECM, VARMA and GARCH estimation
- the Generalized Method of Moments (GMM)
- the Kalman filter and time varying parameters estimation
- unit root tests (ADF, KPSS,...), panel unit roots and cointegration methods (CADF, Johansen,...)
- various business cycle tools: HP, Baxter-King and Christiano-Fitzgerald filters, the Bry-Boschan-Harding-Pagan procedure for the dating of turning points, spectral analysis
- various panel data estimation methods: fixed and random effects, between estimation and panel models with common correlated effects
- Static and Dynamic factor estimation
- numerous time series disaggregation methods: Chow-Lin, Litterman,...
- a syntactic analyzer and a symbolic derivative
- an optimization program that mixes various optimization devices to gain robustness
- a pc-gets like device, that performs automatic general to specific estimations
- estimation of Markov-switching models
- Bayesian Model Averaging estimation
- a contributions device,that provides contributions of exogenous variables to an endogenous one for any dynamic equation

You can download:

WARNINGS:

e-mail: grocer.toolbox[at]free.fr (of course, replace [at] with @).

What's new:

(2015/03/16): Grocer version 1.66 has been posted on the web. You can download Grocer in 2 different versions, according to the Scilab version you use:

  • until the 4.1.2 version,
  • from the 5.2.0 version.
  • Changes to the 1.65 version are the following:

    - Upon a request by Brian Bouterse, functions to run Markov-switching models out-of-sample, ms_reg_oos, ms_var_oos and ms_mean_oos, have been added to Grocer, along with corresponding demos (functions ms_reg_oos_d, ms_var_oos_d and ms_mean_oos_d). Help files have been created accordingly (run -->help ms_var_oos -->help ms_reg_oos or -->help ms_mean_oos).
    - Function MSVAR_Vec_Prob has been slightly changed to avoid overflow in some rare cases: functions ms_reg, ms_var and ms_mean should better converge in these cases.
    - Function MSVAR_Setinit has been again changed to prevent it aborting because some calculations became complex.
    - Performing estimations with trends defined implicitely ('trend^2' for a squared trend for instance) worked only for ts and not for vectors or matrices: now this can be done in both cases.
    - Handling by functions explon, explouniv and explone of variables that can belong to the list of endogenous variables and, lagged, to the list of exogenous variables (such as in VAR models and their derivatives Markow-swithing VAR, johansen cointegration method...) has been improved and a new function ts_span has been created to deal with this. The functionning of any working program should not be altered, except when applied to ts without explicit bounds: the bound should now be calculated by these programs over a longer period.
    - A new option to function pltseries0 has been added, that allows to impose (in pltseries as well as in pltseries0) the lower end and/or the upper end of the y scale ('miny1=x' -resp. 'miny2=x'- if you want to impose the lhs -resp. rhs- y scale to start at x and the same working for the upper end of the y scales: 'maxy1=x' and 'maxy2=x').
    - Messages have been added to function optimg to make the optimization process more easy to monitor.
    - A few elseif, erroneously written elsif, have been corrected (in functions autocum and AndPlob).
    - A few double quotes that ended simple quotes, something that does not hurt released Scilab versions, but that Scilab 6 won't like, have been changed to simple ones (a very small proprotion of Grocer simple quotes)

    (2015/01/22): Grocer version 1.65 has been posted on the web.

    Changes to the 1.64 version are the following:

    - Function str2vec has been extended to allow, in particular, quotes in graph legends.
    - Calculation of the hessian by function hessian0 has been slightly improved (from a matlab program by Hang Qian). Functions performing turning points indicators (ms_quali and some of its subroutines) have been modified accordingly.
    - A new function clean_sheet, that removes empty lines and colums from the text and value of an Excel sheet, has been added and function readxls2bd has been modified accordingly.
    - Function msvar_irf did not work properly for some options: this is corrected; titles of corresponding graphs, provided by function pltmsirf1 have been made more epxlicit.
    - Minor improvements have been made to function deriv_eq providing the symbolic derivative of an equation.
    - Some functions have been changed to prevent them aborting because some calculations became complex: functions e4prees2 (used in some state-space models), MSVAR_Setinit used by all Markov switching programms
    - A correction has made to function nelmead to make the optimization function optimg work better.
    - A bug in function cholp has been corrected.
    - Non important changes have been made to function varma1 and e4prees1.

    (2014/10/09): Grocer version 1.64 has been posted on the web.

    - A few corrections have been made for Grocer to work properly with Scilab 5.5.1: function hetero_sq0 peforrming heteroskedastcity tests has been corrected to be able to deal with the case when there is exact colinearity between some of the regressors; various functions used by function AndPlobthe performing Andrews and Ploberger test have been changed to avoid unwelcome warning messages.
    - function acf1 has also been sliglty modified to avoid unwelcome warning messages.
    - function analyse_eq has been enhanced to be able to deal with '+-' sequences and function rebuild_eq to deal with empty input.
    - Small improvements have been made to functions probit_like and probit1 used by Probit estimation, to function nelmead used by optimg optimisation function and %tsmat_p that display tsmats.
    - Option 'short' in function dblist was not working properly: it now works.

    (2014/07/24): Grocer version 1.63 has been posted on the web.

    This version corrects a few bugs: the legends, that did not appear on graphs with the Scilab 5.5.0, now appear correctly; the installation on Scilab root (an instllation mode that I do not recommend, but that I will maitain since some users are acustomed to it) did not work with the more recent Scilab versions; this has been repaired and made simpler to maitain; within the automatic device, a bug in auto_stage0 (the index of chosen variable was wrong when all variables where significant) has been corrected and minor changes, transparent for the user, have been made to a few functions; prtuniv, prt_res and rolvar_d did not work with Scilab 5.5.0, and their proper functionning has been restored.

    3 New functions, adapted from Scilab lines of code, have been added: a function getconfig that returns the name of the O/S; a function internet2sci, that downloads a file from the Internet (vey similar to the new Scilab function curl, but gives an error status as an output); a function sci_unzip, that unzip a file from Scilab. Defaults have been changed in functions ms_mean, ms_reg and ms_var to achieve convergence more frequently (but recall that bad convergence can still happen and in some cases be dealt with a change in the opimisation parameters of the function, see chapter 6 of the user manual). The possibility to add a legend has been added to function fan_chart.Lastly garch function has been extended by Emmanuel Michaux so as to be able to deal with garch models without any variable in the first stage.

    (2014/04/26): Grocer version 1.62 has been posted on the web.

    This version does not contain new functionnalities, but contains the modifications needed to run properly on Scilab 5.5.0. Moreover, functions irf_asy and irf_mc1, that generated errors since the 1.6 version, have been corrected to work again porperly.

    (2014/03/11): Grocer version 1.61 has been posted on the web.

  • This new version contains new functions: vargranger that performs Granger causality tests in a VAR; rolvar that performs VAR estimations on rolling periods; rolirf that calculates Impulse Response Function for rolling VAR; rolvar_granger that performs Granger (non-)causality tests for a rolling VAR (run help vargranger, help rolvar, help rolirf and help rolvar_granger for details).

  • In function pltseries0, an option to define the size of the graphic window has been added and allows to enter less items in the legend than the corresponding numbers of series.

  • Several bugs to function automatic and automatic_signed, mainly relative to corner solutions, have been corrected (thanks to intensive testing for an empirical project).

  • All '^' applied to vectors have been replaced by '.^' to comply with requirements of future Scilab releases.
  • (2013/10/13): Grocer version 1.6 has been posted on the web. The main novelties of the 1.6 with respect to the previous 1.55 version are the following:

  • new panel functions to estimate panel models with common correlated effects (written by Emmanuel Michaux) have been introduced;

  • a function DMA performing dynamic model averaging, a bayesian estimation method that deals with uncertainty on the true variables among N ones, while allowing time-varying parameters on these variables, has been added;

  • a function varwithfac that allows to introduce factors in a standard VAR has also been added;

  • function doornhans, that performs Doonik and Hansen normality test, has been extended to deal with multivariate models and 2 new functions, arlm0_multi and hetero_sq0_multi, have been created to perform the LM autocorrelation test and the heteroskedasticty test on squared exogenous variables on multivariate models;

  • an optimization function optimg that mixes Scilab optim function and Grocer nelmeade function to gain robustness has been introduced; at the occasion, all functions using an optimization program have been modified to be able to switch between the optim and optimg optimization functions and to allow the user to enter any option to these optimizers; this new function passes all 27 problems provided by the National Institute of Standards and Technology (see http://www.itl.nist.gov/div898/strd/nls/nls_main.shtml)

  • a syntactic analyzer (function analyse_eq) and a symbolic derivative function (deriv_eq) have been added; function nls, that performs non linear least squares, now uses whenever possible the symbolic derivative instead of a numeric one;

  • function automatic, that aims at mimicking the LSE methodology, has been improved along several dimensions: first, for more efficiency, specification tests are now performed at the end of a "path", and no more in a systematic way, and, when specification test are not accepted, then the model is backtracked until they are; second, with a new option 'depth=n' the user can now test more models than previously; and third, the function has been adapted to deal with Probit and VAR models, and can be extended by the user to many other econometric methods with minimal programming; at the occasion the program has been made more modular and easier to maintain;

  • in the same vein, printing functions for univariate methods have been rationalized;

  • working of functions transforming variables into matrices (explon and explouniv), which are at the heart of almost all econometric functions, has been slightly modified for more flexibility: when a set of variables contains more than 1 constant variable, then a warning message is generated instead of stopping the function with an error;

  • functions stafore and dynfore could not deal with trends defined directly in the call of an estimation function: now they can;

  • calculation of forecast variance has been added to function varmaf

  • a few bugs have been corrected: working of functions performing temporal aggregation of time series (m2q, m2qa and q2a) has been restored for matrices of ts ('tsmat' objects); function pltseries could not deal anymore with time series and this has been restored; functions pltms_resid and pltms_yyhat did not adjust correctly the size of the sub-windows in the graphs presenting the residuals and the adjusted results from a multivariate Markov-switching and this has been corrected; the function performing the addition of 2 tsmats, %tsmat_m_tsmat did not work when the option for the names was 'reset' and this has been corrected.

    The user manual has been modified accordingly and slightly enhanced (correction of typos, of demos when they were no more working, ...).

    To see older modifications, see here

    Last updated: 2015/03/22