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 (multicolinearity, 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 program
- an optimization program that mixes various optimization devices to gain robustness
- a pc-gets like device, that performs automatic general to specific estimations, including a block search algorithm to deal with the case when there are more variables than observations
- estimation of Markov-switching models
- Bayesian Model Averaging estimation and bayesian structural time-varying VAR estimation
- a contributions device, that provides contributions of exogenous variables to an endogenous one for any dynamic equation

You can download:


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

What's new:

(2017/03/11): Grocer version 1.73 has been posted on the web.

  • This version contains new adaptations to the Scilab 6 family, entailed by the transition from Scilab-6.0.0.beta2 to Scilab-6.0.0 (in particular, all strings written on several lines were put on a lone one; some remaining additions of an empty matrix and a non empty one have been removed and replaced by lines of codes working with Scilab versions both before and after 6.0.0).
  • This version corrects a bug introduced when adapting the ms_var and ms_reg programs to Scilab-6.0.0.beta2: the programs did not work anymore when all coefficients were switching.
  • Function johansen did not always work with ts: this has been corrected.
  • Function readxls2bd has been extended to work with annual dates written as numbers instead of being suffixed by 'a'.
  • The program automatic worked only with one compulsory variable; now it works with any number of them.
  • The program irf that provides the impulse function from a VAR has been rewritten. The option 'meth=mc1" has been discarded and replaced by the more relevant option 'meth=bootstrap', that estimates the confidence bands by a bootstrap method. Function pltirf2 that plots the corresponding result has been improved.
  • A new option 'saturate_post', that determines the presence of breaks to the constant term in a pc-gets like regression has been introduced to function automatic.
  • Help files have been submitted to an extensive review: files that had not been updated to the more recent help files specifications have been upgraded; some errors and typos have been corected.
  • (2016/07/23): Grocer version 1.72 has been posted on the web.

    This version is the first one to work with the Scilab 6 family, whose 6.0.0.beta2 version has been released in June 2016. This has entailed the modification of an unusal number of functions. In particular, many functions have been modified to deal with a major change with the Scilab 6 family: the result of the addition or subtraction of an empty matrix and a non empty matrix has changed, from the added non empty matrix to an empty matrix. I have performed extensive tests to discover all cases where it may happen in Grocer programs, but I cannot guarantee that there remains none. So if you have the message "Warning adding a matrix with the empty matrix will give an empty matrix result", do not hesitate to send me an e-mail, so that I can deal with the potential implied problems. The installation device has also been changed for Scilab 6 family, due to a change in the working in the lib function.

    This version corrects also a few bugs:

  • Option 'dropna' used to ignore the NA values in a daily ts now works properly on functions da2q and da2m;
  • When used with a second argument to restrict the names of the variables found in the database, function dblist retained erroneously some variables, now it gives the exact list of variables respecting the entered restrictions;
  • Function johansen_common_beta, that worked only in the very particular cases contained in the demo for the johansen suite, now works in the general cases;
  • Function prt_multilogit, that did not search for the coefficients values in the results tlist, now does.
  • Functions predfailin0 and auto_waldf0 sometimes generated an error because of the switching of a real number to a complex one with zero imaginary part: this has been corrected;
  • A few functions have also been improved:

  • Speed of function deriv_eq1 has been greatly increased. The working of function analyse_eq has also been changed: it now produces a global variable called grocer_variables, that collects the names of all variables found during the analysis;
  • Function values has been extended to allow the extraction of only a subset of variables in a tsmat;
  • Function %ts_mean %tsmat_mean has been created to overload function mean with ts and tsmat typed data.
  • (2015/10/03): Grocer version 1.71 has been posted on the web.

    The 1.71 version is a minor evolution of the 1.7 version, with the following changes:

  • Function impexc2bd has been extended to allow the exportation of comments in time series and to suppress the 'a' in Grocer year dates;
  • Erroneous } signs in functions IPS1 and select_mask have been replaced by the correct ] sign;
  • In functions ms_reg and ms_var, the possibility of entering options to optim have been introduced.
  • There was a bug with the symbolic derivative with respect to the log function, that was not properly calculated when the expression between brackets contained operations.

    (2015/10/03): Grocer version 1.7 has been posted on the web.

    The main novelties of the 1.7 with respect to the previous 1.67 version are the following:

  • Function automatic has been extended to incorporate the block search algorithm proposed by J. Doornik to deal with problems when the number of variables is greater than the number of observations. Grocer block search has been compared to Doornik Autometrics block search program for the battery of tests used by Doorik in his 2009 paper. These results of these tests are presented in chapter 15 of Grocer manual and can be reproduced using the material given here: they show that Grocer block search program compares favourably with Autometrics one.
  • In the same vein, function ols has also been extended to allow impulse saturation, the methodolgy proposed by Castle, Doornik and Hendry to test the the presence of structural breaks in an equation.

  • A new Function Hetero_TVP_VAR has been created to allow the estimation of a structural VAR with varying coefficents and volatilities, estimated in bayesian framework using a Monte-Carlo Markov Chain (MCMC) algorithm. The user can adapt the priors to her needs and a function tvpvar_prior helps helps her to enter her choices. The function also come with a function Hetero_TVP_VAR_stresid that plots the -time varying- standard deviations of the residuals and a function Hetero_TVP_VAR_irf that plots the -time varying- impulse response functions of the VAR. It also comes with a function tvpvar_diagnos that performs convergence diagnostics. Latsly, functions MCMC_autocorr, that calculates autocorrelation of draws for a given set of parameters, geweke_diagnos that performs Geweke''s numerical std error, relative numerical efficiencies and inefficiencies and raftery that performs Raftery and Lewis (1991) convergence diagnostic, that is the # of draws needed in MCMC to estimate the posterior cdf of the q-quantile to within +/- r accuracy with probability s, can be used for various other bayesian estimations using the MCMC algorithm. Function wish_rnd and wish_rnd1, that makes randow draw in a Wishart law have also been added.
  • A function msvar_irf_cb, written by Stefan Fiesel, that performs confidence bands around impulse response functions in a Markov-switching VAR model, has been added. This has also lead to write a function msvar_draw that draws at random an artifical Markov-switching VAR with any set of parameters.

  • Functions findobject and strsubst_trueobj, that find if an object name is truly in a mathematical formula and to replace object names by another name in a mathemtical formula, have been documented.

  • Minor adjustements have been made to numerous functions, in order to adapt them to the coming Scilab 6.0 version: this should not change Grocer working for older versions, but has nevertheless the advantage to make the code somehow cleaner (Grocer cannot be installed for the moment with the Scilab 6.0.alpha, because the installation programs has yet to be adpated; but Grocer functions can nevertheless be run using less straightforward means: if you are an experienced user and are interested in testing Grocer under Scilab 6.0.alpha, send me an a-mail and I will indicate you how to proceed).
  • The user manual has been modified accordingly and slightly enhanced (correction of typos, of a few errors,...).

    WARNING: With the release of Scilab 6.0 and because of the changes Siclab 6.0 entails to Grocer implementation, Grocer releases now work "only" with Scilab versions from the 5.5.0 one and not with older ones. If this poses a problem to you, do not hesitate to signal it to me by e-mail.

    To see older modifications, see here

    Last updated: 2017/03/11