Grocer


Table of Contents

I. Time series
car2freq — transforms a car into a frequency
da2m — transformation of daily data into monthly ones
da2q — transformation of daily data into quarterly ones
date2fq — finds the frequency associated to a date
date2num — transforms a date into a number
date2num_fq — transforms a date into a number and its frequency
date2num_m — transforms a matrix of dates into numbers
datelf2hf — transformation of a date into a higher frequency date
datelf2hf0 — transformation of a date into a higher frequency date
datets — returns the time span of a ts
def0_basets — creation of the default frequencies data base
def_basets — creation of the frequencies data base
def_dailyform — creation of the data base for the format of daily dates
delda — differentiates a ts ignoring NA values
delts — differentiates a ts
diff_date — returns the difference between 2 dates
dummy — create a dummy variable
extrap — extrapolate a ts by another ts
freq2car — transforms a frequency into a string
freqts — returns the frequency of a ts
freqts_c — returns the frequency of a ts in complex form
growthr — growth rate of a ts
lagda — lag a ts ignoring NA values
lagts — lag a ts
m2q — transforms monthly data into quarterly ones
num2date — transforms a number into a date
overlay — overlay several ts
prtts — print ts
q2a — transforms quarterly data into annual ones
reshape — creation of a ts from a vector
seasdummy — create a seasonal dummy variable
series — returns the values of a ts
st_dev — standard deviation of a vector or a ts
subper — restrict a ts to a subperiod
ts2vec — transforms a ts into a vector
values — value of a ts at some date
var_t — variances of n ts at a given date
vec2ts — vector to timeseries
II. Matrices of Time series
db2tsmat — Converts a database into a tsmat
ts2tsmat — Converts time sries into a tsmat
tsmat2ts — Converts a tsmat into time series
tsmat_names — Changes how the names of a tsmat are modified after an operation
III. Basic functions
autocum — AR(1) cumulation
cols — # of columns in a matrix
com_size — replaces values of matrix x
commutation — commutation of a matrix
crlag — circular lag function
dblist — gives the content of a database
defaultcoef — finds default coefficients in equations
detrend — detrend a matrix
dmult — gauss dmult function
duplication — Magnus and Neudecker's duplication matrix
elimination — Magnus and Neudecker's elimination matrix
expbd2exc — exportation to Excel
extraptab — extrapolation of statistical tables
findcoef — find coefficients in an equation
fuslist — merge vectors of a list
fusvect — sorted fusion of vectors
impexc2bd — importation of a csv excel file
invpd — mimic Gauss function invpd
invvech — inverse of vech
is_empty — check if a variable is empty
is_scalar — check if a matrix is a scalar
joinstr — concatenation of strings and strings vectors
lag — creation of a lagged matrix
longrun_variance — long run variance of a stationary series
matdiv — matrix quotient
matmul — matrix elementwise multiplication
meanc — mimics gauss function meanc
miss — converts a specified value to NA
missrv — converts a NA to a specified value
mlag — lag of a matrix
mlag0 — lag of a matrix
mlagb — lag a matrix
mvblockboot — Multivariate block-bootstrap
newey_west — Newey_West variance estimator
packr — deletes rows of a matrix containing missing values
polymult — mimics gauss function polymult
ptrend — matrix of polynomial trend
readxls2bd — importation of an excel file
repmat — mimics Matlab function repmat
reshape_gauss — mimics gauss function reshape
rev — mimics gauss function rev
rows — # of rows in a matrix
search_cte — find the indexes of constant colums
seqa — production of a sequence of values
shiftr — mimics gauss function shiftr
sortc — mimics gauss function sortc
spencer — filters a series with a Spencer filter
stdc — mimics gauss function stdc
str2mat — mimics matlab function str2mat
str2vec — string to vector of strings
studentize — studentize a ts, a vector or a matrix
tdiff — produce matrix differences
transdif — differenciation and Box-Cox transformation
trend — exponentiated time trend
trimr — strip a matrix
undrift — removes the drift or a linear time trend
uninstall_grocer — uninstall grocer
unique — mimics Matlab function unique
var2cor — covariance to correlation
varcov0 — covariance matrix
vec — stacks columns of a matrix
vec2col — vector into column vector
vec2row — vector into row vector
vech — stacks a symmetric matrix
vech_gauss — mimics gauss function vech
vecr — stacks rowwise
xpnd1 — mimics gauss function xpnd
IV. General Functions for estimation
bounds — setting estimation bounds
explolist — splitting of a list
explon — explosion of several sequences of variables
explone — explosion of one sequence of variables
explots — explosion of a list of ts
explouniv — explosion of a sequence of variables
explovars — explosion of a sequence of variables
lagbounds — lag bounds in a regression
res2ts — result vector object to timeseries
V. Optimisation
dfp_min — DFP minimization
frpr_min — Fletcher, Reeves, Polak, Ribiere minimization
hessian — finite symmetric difference Hessiann
linmin — line minimization routine
maxlik — maximization function
numz0 — numerical derivative
pow_min — Powell minimization
stepz — Step size in maximisation programs
VI. Single equation regressions
ar1_grad — gradient for ols model with AR1 errors
ar1_like — log-likelihood for ols model with AR1 errors
define_func2inv — store a list of functions and their inverse
dynfore — Dynamic simulation of an equation
hwhite — White's adjusted heteroscedastic estimation
invxpx — inversion of X'X
iv — instrumental variables
iv1 — instrumental variables
lad — least absolute deviations regression
mcov — White's X'WX
nls — non linear least squares
nwest — Estimation with Newey-West correction on standard errors
nwest1 — Estimation with Newey-West correction on standard errors
ols — ordinary least squares
ols0 — ordinary least squares
ols1 — ordinary least squares
ols2 — ordinary least squares
ols2_cons — constrained ordinary least squares
ols_cons — constrained ordinary least squares
olsar1 — maximum likelihood estimation of an autocorrelated model
olsar1_1 — maximum likelihood estimation of an autocorrelated model
olsc — Cochrane-Orcutt estimation of an autocorrelated model
olsc0 — Cochrane-Orcutt estimation of an autocorrelated model
olsc1 — Cochrane-Orcutt estimation of an autocorrelated model
olspec — ordinary least squares with specification tests
olst — ols with t-distributed errors
ridge — ridge regression
robust — robust regression
rolreg — Compute rolling or recursive out-of-sample prevision
statfore — static forecast
theil — Theil-Goldberger mixed estimator
VII. Econometric tests and diagnostics
ar1_grad — gradient for ols model with AR1 errors
ar1_like — log-likelihood for ols model with AR1 errors
define_func2inv — store a list of functions and their inverse
dynfore — Dynamic simulation of an equation
hwhite — White's adjusted heteroscedastic estimation
invxpx — inversion of X'X
iv — instrumental variables
iv1 — instrumental variables
lad — least absolute deviations regression
mcov — White's X'WX
nls — non linear least squares
nwest — Estimation with Newey-West correction on standard errors
nwest1 — Estimation with Newey-West correction on standard errors
ols — ordinary least squares
ols0 — ordinary least squares
ols1 — ordinary least squares
ols2 — ordinary least squares
ols2_cons — constrained ordinary least squares
ols_cons — constrained ordinary least squares
olsar1 — maximum likelihood estimation of an autocorrelated model
olsar1_1 — maximum likelihood estimation of an autocorrelated model
olsc — Cochrane-Orcutt estimation of an autocorrelated model
olsc0 — Cochrane-Orcutt estimation of an autocorrelated model
olsc1 — Cochrane-Orcutt estimation of an autocorrelated model
olspec — ordinary least squares with specification tests
olst — ols with t-distributed errors
ridge — ridge regression
robust — robust regression
rolreg — Compute rolling or recursive out-of-sample prevision
statfore — static forecast
theil — Theil-Goldberger mixed estimator
VIII. Unit roots and cointegration
adf — adf unit root test
c_sja — critical values for Johansen maximum eigenvalue statistic
c_sjt — critical values for Johansen trace statistic
cadf — ADF statistic for residuals from a cointegrating regression
critecm — critical values and p-values for the error correction test
ers — Elliott-Rothenberg-Stock unit root test
johansen — Johansen cointegration tests
kpss — KPSS unit root test
olsecm — Error correction test for cointegration
phil_perr — Phillips-Perron unit-root test
rztcrit — critical values for the cadf Zt statistic
schmiphi — computes Schmidt-Phillips test
schmiphi_tab — critical values for the Schmidt-Phillips statistic
IX. Johansen cointegration mmethod
johansen — Johansen cointegration tests
johansen_beta_part — impose and test restrictions on the cointegration relations
johansen_common_beta — impose and test common restrictions on the cointegration relations
johansen_eigen — calculate eigen values of a johansen procdure
johansen_known_alpha — impose and test known columns of the error correction terms
johansen_known_beta — impose and test restrictions on the cointegration relations
johansen_normalize — normalize the eigen vectors and error correction terms
johansen_test_exo_lt — test the correct inclusion of an exogenous in the cointegration space
johansen_test_lr_weak_exog — test the long run weak exogeneity of a subset of variables
johansen _test_lr_weak_exog — test the long run weak exogenity of a subset of variables
X. Multivariate regressions
defaultcoef — finds default coefficients in equations
eq2xcol — Transformation of a system of equations into a matrix vector
eqlist — recovers objects names in an equation
exploeqs — Transformation of 2sls or 3sls equations
explosys — Transformation of sur equations
sur — Zellner Seemingly Unrelated Regression
syslist — recovers objects names in a system of equations
threesls — Three-Stage Least-squares Regression
twosls — Two-Stage Least-squares Regression
XI. VAR estimations
VAR — estimates a VAR model
becm — performs bayesian error correction model estimation
bvar — performs bayesian VAR estimation
bvar1 — low level estimation of a bayesian VAR model
ecm — performs error correction model estimation
irf — Calculates Impulse Response Function for VAR
irf0 — Low-level Impulse Response function
irf_asy — asymptotic Impulse Response function for VAR
irf_mc1 — Monte-Carlo Impulse Response function for VAR
scstd — determines bvar function scaling factor
theilbv — Performs Theil-Goldberger for theilbv model
var1 — estimates a VAR model (low level)
vare — residuals from a VAR estimation
varf — VAR forecasting
XII. ARMA and VARMA tools
VAR — estimates a VAR model
becm — performs bayesian error correction model estimation
bvar — performs bayesian VAR estimation
bvar1 — low level estimation of a bayesian VAR model
ecm — performs error correction model estimation
irf — Calculates Impulse Response Function for VAR
irf0 — Low-level Impulse Response function
irf_asy — asymptotic Impulse Response function for VAR
irf_mc1 — Monte-Carlo Impulse Response function for VAR
scstd — determines bvar function scaling factor
theilbv — Performs Theil-Goldberger for theilbv model
var1 — estimates a VAR model (low level)
vare — residuals from a VAR estimation
varf — VAR forecasting
XIII. GARCH models
garch — garch estimation
garch_grad — Generates garch gradient
garch_grad2 — Generates garch gradient
garch_like — log likelihood for garch model
garch_sigt — Generates garch sigmas
garch_trans — Transforms garch parameters
XIV. Automatic estimation
auto_stage0 — elimination of non significative variables
auto_stage1 — search of a statistically admissible regression
auto_test — build specification tests function and vector of names
automatic — automatic general to specific regression
def_results — creation of two tlists for subsequent regressions
ols1a — ordinary least squares
ols2a — ordinary least squares
ols3a — ordinary least squares
test_spec0 — five specification tests
XV. Kalman filter estimation
filter — Kalman filter
filter_like — Kalman filter log-likelihood
kalman — Kalman filter estimation
smoothing — Kalman smoother
tvp — Time varying parameters estimation
tvp_param1 — transformation of tvp parameters into kalman compatible ones
tvp_param1a — transformation of tvp parameters into kalman compatible ones
tvp_param1ad — transformation of tvp parameters into kalman compatible ones
tvp_param1d — transformation of tvp parameters into kalman compatible ones
tvp_param2 — transformation of tvp parameters into kalman compatible ones
tvp_param2a — transformation of tvp parameters into kalman compatible ones
tvp_param2ad — transformation of tvp parameters into kalman compatible ones
XVI. Supplementary distibution functions
beta — beta function
beta_pdf — beta probability distribution
beta_rnd — beta random draws
bincoef — binomial coefficients
bino_rnd — binomial random draws
chis_pdf — chi-squared probability distribution
chis_rnd — chi-squared random draws
fdis_pdf — Fisher probability distribution
fdis_rnd — Fisher random draws
gamm_pdf — Gamma probability distribution
gamm_rnd — Gamma random draws
hypg_cdf — hypergeometric cumulative distribution
hypg_inv — hypergeometric quantile
hypg_pdf — hypergeometric probability distribution
hypg_rnd — hypergeometric random draws
logn_cdf — lognormal cumulative distribution
logn_inv — lognormal cumulative distribution
logn_pdf — lognormal probability distribution
logn_rnd — lognormal random draws
logt_cdf — logistic cumulative distribution
logt_inv — logistic quantiles
logt_pdf — logistic probability distribution
logt_rnd — logistic random draws
norm_pdf — normal distribution
norm_rnd — normal random draws
pois_pdf — Poisson distribution
pois_rnd — Poisson random draws
stdn_pdf — Student distribution
tdis_pdf — Student probability distribution
tdis_rnd — Student random draws
unif_rnd — Uniform random draws
wish_rnd — Wishard random draws
XVII. Business cycle tools
agf — autocovariance generating function
banerji — performs banerji test to evaluate the leading profile of a series against another one
bkfilter — Baxter-King filter
brybos — Bry-Boshan turning points datation
cffilter — Christiano-Fitzgrald filter
define_recession — define the location of peaks and troughs
hpfilter — Hodrick Prescott filter
hpofilter — Hodrick Prescott one-sided filter
spectral — non parametric spectral analysis of time series
specvarma — compute parametric spectral analysis of time series
XVIII. Contributions
balance_identity — Balances an identity numerically approximatively true
contrib — contribution of an exogenous variable
contrib_logq2gra — contributions to an annual growth rate
mainf — Infinite Moving average representation
XIX. Panel equation regressions
paneldb — Construct a tlist in grocer panel format
panelfit — Compute fitted value implied by panel estimation
pbetween — between Estimation for Panel Data
pbetween1 — between Estimation for Panel Data
pfixed — fixed Effects Estimation for Panel Data
pfixed1 — Random Effects Estimation for Panel Data
phaussman — Haussman test on panel estimations
ppooled — pooled Estimation for Panel Data
ppooled1 — Pooled Estimation for Panel Data
prandom — Random Effects Estimation for Panel Data
prandom1 — Random Effects Estimation for Panel Data
XX. Panel unit root tests
ADF_Individual — ADF Unit Root Tests on Individual Time Series
BNG_ur — Bai and Ng Panel Unit Root Test
BNG_ur1 — Bai and Ng Panel Unit Root Test
Chang_IV — Chang Panel Unit Root Test
Chang_IV1 — Chang Panel Unit Root Test
Choi — Choi Panel Unit Root Test
Choi1 — Choi Panel Unit Root Test
IPS — Im, Pesaran and Shin Panel Unit Root Test
IPS1 — Im, Pesaran and Shin Panel Unit Root Test
Levin_Lin — Levin and Lin Panel Unit Root Test
Levin_Lin1 — Levin and Lin Panel Unit Root Test
Maddala_Wu — Maddala and Wu Panel Unit Root Test
Maddala_Wu1 — Maddala and Wu Panel Unit Root Test
Moon_Perron — Moon and Perron Panel Unit Root Test
Moon_Perron1 — Moon and Perron Panel Unit Root Test
Pesaran — Pesaran Panel Unit Root Test
Pesaran1 — Pesaran Panel Unit Root Test
XXI. Time series disaggregation
chowlin — Temporal disaggregation using the Chow-Lin method
chowlin1 — Temporal disaggregation using the Chow-Lin method
aggreg1 — Generates a temporal aggregation matrix
bfl — Temporal disaggregation using the Boot-Feibes-Lisman method
bfl1 — Temporal disaggregation using the Boot-Feibes-Lisman method
denton — Multivariate temporal disaggregation with transversal constraint
denton1 — Multivariate temporal disaggregation with transversal constraint
difonzo — Multivariate temporal disaggregation with transversal constraint
difonzo1 — Multivariate temporal disaggregation with transversal constraint
fernandez — Temporal disaggregation using the Fernandez method
fernandez1 — Temporal disaggregation using the Fernandez method
litterman — Temporal disaggregation using the Litterman method
litterman1 — Temporal disaggregation using the Litterman method
XXII. Markov-switching models
cod_kern — divides data into quantiles with a kernel method
ms_estimate — Markvov Switching regression model
ms_forecast — forecast from a Markvov Switching regression model
ms_mean — Markov Switching mean-variance model
ms_quali — Estimates a ms turning point model
ms_reg — Markvov Switching regression model
ms_var — Markov Switching VAR model
MSVAR_stderr — Markvov Switching 2nd order moments
XXIII. Bayesian Model Averaging
bintodec — During each BMA step, convert "base 2" models codification into bits
bma_g — Bayesian model averaging
bma_g1 — Bayesian model averaging
bmapost_g — Evaluate log marginal posterior of a BMA model
densbma_g — Print the posterior density function of estimated coefficients by BMA method
find_new — Determine if the selected variables in a BMA step represent a new model
jump_g — MCMC with reversible jump to sample variables for changing model size in BMA
jump_g — MCMC model composition to sample variables for changing model size in BMA
XXIV. Generalized Method of Moments
gmm — Generalized Method of Moments
gmm1 — Generalized Method of Moments
gmmAndMon — Andrews-Monahan HAC estimators
gmmCcapmJ — Gradients of moment condition for power utility CCAPM example
gmmCcapmM — Moments condition for power utility CCAPM example
gmmDiagW — Plots GMM weighting matrix
gmmDtest — performs D test of model comparaison for GMM
gmmLM — LM test for GMM
gmmLinJ — Jacobian of moment conditions for linear GMM estimation
gmmLinM — Provide moment conditions for linear GMM estimation
gmmLsFunc — GMM objective function
gmmLsGrad — GMM gradients of the objective function
gmmMomtRestr — Performs test of moment restriction
gmmMsdJ — Jacobian for Mean/StdDev GMM estimation
gmmMsdM — Provide moment conditions for Mean/StdDev GMM estimation
gmmNlWald — Wald test for GMM with nonlinear restrictions
gmmRdef — Computes the value for the restrictions in a nonlinear Wald test
gmmS — Spectral density matrix in GMM
gmmWald — Wald test
XXV. Factor Analysis
fac_acp — Static factor analysis
fac_acp1 — Static factor analysis
fac_kalman — dynamic factor analysis with the Kalman filter
fac_pca — Static factor analysis
fac_pca1 — Static factor analysis
XXVI. Qualitative Econometrics Functions
logit — logit regression
multilogit — multivariate logit regression
multilogit1 — multivariate logit regression
ologit — multivariate ordered logit regression
ologit1 — multivariate ordered logit regression
oprobit — multivariate ordered probit regression
oprobit1 — multivariate ordered probit regression
probit — probit regression
tobit — Tobit estimation
XXVII. Printings and graphs
dealyna — splits y series containing NAs
drawx — draw a readable x axis
drawy — draw a readable y axis
fan_chart — draws a fan-chart
font_title — changes the font of the title
histg — plots as an histogram a probability distribution function
mat2latex — Convert a matrix into LaTex matrix or LaTex table
mpltseries — multiple 2d plot in one page
param_g — determines the font parameters
plt_cusum — plots the results of the cusum test
plt_dfb — plots dfbetas
plt_dff — plots dffits, studentized residuals …
pltacf — plots partial autocorrelation fonction
pltdensbma_g — plots the posterior density function of coefficients in a BMA regression
pltfac_kalm — plots the residuals of an ARMA estimation
pltirf1 — plots impulse functions
pltirf2 — plots impulse functions
pltms_prob — plots smoothed or filtered probabilities of a Markov switching regression
pltms_quali — plots smoothed or filtered probabilities of a qualtitative turning point estimation
pltms_resid — plots residuals from a Markov switching regression
pltms_yyhat — plots the raw and adjusted series from a Markov switching regression
pltseries — 2d plot
pltseries0 — 2d plot
plttvp — plots tvp results
pltuniv — plots univariate results
pltvarma — plots the residuals of an ARMA estimation
printmat — prints a matrix
printsep — prints a separator
prt_test — prints the results of specification tests embodied in a tlist results
prtauto — prints automatic() results
prtauto_multi — prints some automatic() results
prtauto_univ — prints some automatic() results
prtbma_g — prints Bayesian Model Averaging results
prtchi — prints a Chi2 test
prtdiebmar — prints the result from the Diebold-Mariano test
prtdisag — prints the results of a time series disaggregation
prtfac_acp — prints static factor estimation results
prtfac_kalm — prints fac_kalm estimation results
prtfish — prints a Fisher test
prtgmm — prints gmm estimation results
prthaussman — prints the results of a panel Haussman test
prtjohan — prints Johansen cointegration results
prtjohvec — prints Johansen cointegration vectors
prtms — prints Markov switching regression results
prtms_quali — prints the results of a HMM estimation based upon qualitative data
prtres — prints any regression results
prtsys — prints system estimation results
prttvp — prints tvp estimation results
prtunitr — prints unit root estimation results
prtuniv — prints univariate estimation results
prtvar — prints VAR estimation results
prtvarf — prints VAR or VARMA forecast results
prtvarma — plots partial autocorrelation fonction
yscale — determines y scale