I am trying to write a script that, based on a regression with a lot of
variables and lags, drop unsignificant variables and leave only the
significant regressors.
I am having problems to identify the variable to drop in each iteration
because gretl sometimes detects "exact" collinearity (but not perfect
collinearity) and removes one regressor, so that the regressors I write in
the ols command are not the same as gretl uses in the estimation, so it makes
difficult to associate the coefficients in $coeff with my list of regressors.
I suppose gretl detects "exact" collinearity when det(X'X)<epsilon being
epsilon a very small number. And in general I think it is good that the
program removes a variable and run the regression.
But I don't find a solution without asking Allin and Jack to change the ols
source.
I think changing the ols source may be some solutions to resolve this problem.
Gretl after the ols estimation could:
1- save the variable with highest t pvalue in a $ variable (for example its
ID number in a scalar)
2- save a list with the regressors used in the estimation (or a row matrix
with the ID numbers)
Do you see any other solution?
--
Ignacio Diaz-Emparanza
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU
Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
T.: +34 946013732 | F.: +34 946013754
www.et.bs.ehu.es