elimination of non significative variables
[done,r0,indxf]=auto_stage0(y,x,indcte,r00,rmod,alpha,f0_sig,eta,z)
y = vector of the endogenous variable
x = matrix of the exogenous variables
indcte = index of the constant variable (= nvar+1 if there is no constant in the r00 model)
r00 = results of the estimation (by ols or ols2) of the model Y = X*b+U
rmod = a tlist defined by def_results
alpha = broad significance level (typically lower than f0_sig)
f0_sig = maximum joint significance level allowing elimination of the corresponding variables
eta = (px1) significance level for specification tests
z = matrix of the compulsory variables (the ones that must be in the regression whatever significance they have)
done = %t if all variables are significant, %f otherwise
r0 = results structure of the final model (the one without the eliminated variables) as provided by ols2
indxf = indexes in x of the remaining exogenous variables
[done,r0,indxf]=auto_stage0(y,x,5,r00,rmod,0.05,0.9,0.01*ones(5,1)) [done,r0,indxf]=auto_stage0(grocer_y,grocer_x,indcte,r1_00,lrmod(1),grocer_alpha, grocer_f0_sig,grocer_eta) // In example 1, function auto_stage0 is called with a 0.05 general significance level, a 0.9 elimination level and a 0.01 significance level for 5 specification tests. Example 2 is the call to function auto_satge0 in automatic (the most natural use).