El 16/07/11 02:46, Cottrell, Allin escribió:
On Fri, Jul 15, 2011 at 11:37 AM, Ignacio Diaz-Emparanza
<ignacio.diaz-emparanza(a)ehu.es> wrote:
> Is there any way of saving in a list the significative variables that
> results after the 'omit --auto' command?
>
> I tried
>
> <hansl>
> ols Y const X1 X2 (...etc)
> omit --auto
> list uvar=$xlist
> </hansl>
>
> but I am seeing that $xlist maintains the variables from the initial
> regression.
Were any variables in fact omitted in this case? I just tried
<hansl>
open data4-10
ols 1 0 2 3 4 5 6
list XL1 = $xlist
list XL1 print
omit --auto
list XL2 = $xlist
list XL2 print
</hansl>
and got output for the two lists:
? XL1
const CATHOL PUPIL WHITE ADMEXP REV
? XL2
const CATHOL WHITE
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
Yes there were omitted variables. I am seeing that I can repeat your
script obtaining your same results, but with my data the lists of
variables generadted before and after the 'omit' command is the same.
Here are my results:
<output>
? m1_ols <- ols renta2006 const capital l_regre l_regre2
m1_ols:
OLS, using observations 1-250 (n = 192)
Missing or incomplete observations dropped: 58
Dependent variable: renta2006
coefficient std. error t-ratio p-value
---------------------------------------------------------------
const 14639.2 3270.20 4.477 1.69e-05 ***
capital 224.908 1136.41 0.1979 0.8434
pibpc06 0.258699 0.190965 1.355 0.1780
GasT06_pc -7.69157 11.9757 -0.6423 0.5219
GasCo06_pc 8.53812 11.8751 0.7190 0.4735
GasCa06_pc 7.92740 11.7618 0.6740 0.5016
EstIndu06_pc -9.56127 19.6812 -0.4858 0.6280
EstCons06_pc -193.165 116.651 -1.656 0.1002
EstCom06_pc 219.689 107.176 2.050 0.0425 **
EstHos06_pc -424.834 225.760 -1.882 0.0622 *
EstTrans06_pc 195.715 127.908 1.530 0.1285
EstInte06_pc -143.172 173.804 -0.8238 0.4116
EstOt06_pc 58.0083 98.6155 0.5882 0.5574
Emp_Ind06_pc -23587.9 16585.1 -1.422 0.1575
Emp_Con06_pc 5984.31 28232.8 0.2120 0.8325
Emp_Com06_pc -19324.2 14823.1 -1.304 0.1947
Emp_Hos06_pc 41439.1 15985.1 2.592 0.0107 **
Emp_Tra06_pc -47031.9 17412.0 -2.701 0.0079 ***
Emp_Fin06_pc 14045.7 33464.9 0.4197 0.6754
Emp_OtS06_pc -32297.9 23291.0 -1.387 0.1680
Turis06_pc 1552.10 2171.71 0.7147 0.4761
Carga06_pc -4249.79 10086.2 -0.4213 0.6742
Par06_pc -62827.9 42745.2 -1.470 0.1441
Vpibpc06 -0.491249 0.210508 -2.334 0.0212 **
Gpibpc06 -0.198664 0.219040 -0.9070 0.3662
VGasT06_pc 3.35718 12.4759 0.2691 0.7883
GGasT06_pc 8.61628 12.1692 0.7080 0.4802
VGasCo06_pc -6.22659 12.4701 -0.4993 0.6184
GGasCo06_pc -10.4315 12.2720 -0.8500 0.3969
VGasCa06_pc -3.75115 12.2763 -0.3056 0.7604
GGasCa06_pc -8.71743 11.9407 -0.7301 0.4667
VEstIndu06_pc 31.8290 34.6712 0.9180 0.3604
GEstIndu06_pc -9.36813 35.8057 -0.2616 0.7940
VEstCons06_pc 104.586 127.755 0.8186 0.4145
GEstCons06_pc 148.486 130.305 1.140 0.2567
VEstCom06_pc -439.383 120.983 -3.632 0.0004 ***
GEstCom06_pc -209.136 125.003 -1.673 0.0968 *
VEstHos06_pc 669.718 262.448 2.552 0.0119 **
GEstHos06_pc 292.417 285.704 1.023 0.3080
VEstTrans06_pc -250.131 141.168 -1.772 0.0789 *
GEstTrans06_pc -264.133 156.396 -1.689 0.0937 *
VEstInte06_pc 477.038 177.869 2.682 0.0083 ***
GEstInte06_pc 188.988 189.803 0.9957 0.3213
VEstOt06_pc -144.880 118.941 -1.218 0.2255
GEstOt06_pc 66.9161 132.162 0.5063 0.6135
VEmp_Ind06_pc 42232.4 18274.3 2.311 0.0225 **
GEmp_Ind06_pc 20613.5 19048.4 1.082 0.2813
VEmp_Con06_pc 13433.7 28989.7 0.4634 0.6439
GEmp_Con06_pc -622.595 31859.7 -0.01954 0.9844
VEmp_Com06_pc 40153.2 16791.7 2.391 0.0183 **
GEmp_Com06_pc 19805.3 17162.1 1.154 0.2507
VEmp_Hos06_pc -9065.46 23261.2 -0.3897 0.6974
GEmp_Hos06_pc -55686.8 26272.7 -2.120 0.0360 **
VEmp_Tra06_pc 64215.9 18688.7 3.436 0.0008 ***
GEmp_Tra06_pc 41811.2 26335.8 1.588 0.1149
VEmp_Fin06_pc -28930.0 33943.7 -0.8523 0.3957
GEmp_Fin06_pc -13553.8 37773.6 -0.3588 0.7203
VEmp_OtS06_pc 60313.6 25886.5 2.330 0.0214 **
GEmp_OtS06_pc 25153.2 26955.1 0.9332 0.3525
VTuris06_pc -1845.25 2222.83 -0.8301 0.4080
GTuris06_pc -1335.91 2177.28 -0.6136 0.5406
VCarga06_pc 7311.69 10319.5 0.7085 0.4799
GCarga06_pc 3156.57 10110.4 0.3122 0.7554
VPar06_pc 43704.9 48815.4 0.8953 0.3723
GPar06_pc 54771.8 49922.0 1.097 0.2747
VConst 2431.35 3452.94 0.7041 0.4827
GConst -419.475 3655.47 -0.1148 0.9088
Mean dependent var 14207.78 S.D. dependent var 1869.337
Sum squared resid 2.41e+08 S.E. of regression 1387.303
R-squared 0.639551 Adjusted R-squared 0.449233
F(66, 125) 3.360446 P-value(F) 2.76e-09
Log-likelihood -1620.377 Akaike criterion 3374.754
Schwarz criterion 3593.007 Hannan-Quinn 3463.148
Excluding the constant, p-value was highest for variable 235 (GEmp_Con06_pc)
m1_ols saved
? list XL1 = $xlist
Generated list XL1
? list XL1 print
const capital pibpc06 GasT06_pc GasCo06_pc GasCa06_pc EstIndu06_pc \
EstCons06_pc EstCom06_pc EstHos06_pc EstTrans06_pc EstInte06_pc \
EstOt06_pc Emp_Ind06_pc Emp_Con06_pc Emp_Com06_pc Emp_Hos06_pc \
Emp_Tra06_pc Emp_Fin06_pc Emp_OtS06_pc Turis06_pc Carga06_pc Par06_pc \
Vpibpc06 Gpibpc06 VGasT06_pc GGasT06_pc VGasCo06_pc GGasCo06_pc \
VGasCa06_pc GGasCa06_pc VEstIndu06_pc GEstIndu06_pc VEstCons06_pc \
GEstCons06_pc VEstCom06_pc GEstCom06_pc VEstHos06_pc GEstHos06_pc \
VEstTrans06_pc GEstTrans06_pc VEstInte06_pc GEstInte06_pc VEstOt06_pc \
GEstOt06_pc VEmp_Ind06_pc GEmp_Ind06_pc VEmp_Con06_pc GEmp_Con06_pc \
VEmp_Com06_pc GEmp_Com06_pc VEmp_Hos06_pc GEmp_Hos06_pc VEmp_Tra06_pc \
GEmp_Tra06_pc VEmp_Fin06_pc GEmp_Fin06_pc VEmp_OtS06_pc GEmp_OtS06_pc \
VTuris06_pc GTuris06_pc VCarga06_pc GCarga06_pc VPar06_pc GPar06_pc \
VConst GConst
? omit --auto
Sequential elimination using two-sided alpha = 0.10
Dropping GEmp_Con06_pc (p-value 0.984)
Dropping GConst (p-value 0.895)
Dropping capital (p-value 0.823)
Dropping VGasT06_pc (p-value 0.804)
Dropping GEstIndu06_pc (p-value 0.834)
Dropping GCarga06_pc (p-value 0.747)
Dropping GEmp_Fin06_pc (p-value 0.713)
Dropping Emp_Fin06_pc (p-value 0.799)
Dropping VGasCa06_pc (p-value 0.568)
Dropping VEmp_Hos06_pc (p-value 0.605)
Dropping Emp_Con06_pc (p-value 0.588)
Dropping GEstOt06_pc (p-value 0.479)
Dropping GTuris06_pc (p-value 0.476)
Dropping EstInte06_pc (p-value 0.444)
Dropping VTuris06_pc (p-value 0.324)
Dropping Turis06_pc (p-value 0.478)
Dropping Carga06_pc (p-value 0.694)
Dropping EstOt06_pc (p-value 0.227)
Dropping VEstCons06_pc (p-value 0.248)
Dropping GEstCons06_pc (p-value 0.337)
Dropping GEmp_Com06_pc (p-value 0.445)
Dropping GEmp_OtS06_pc (p-value 0.533)
Dropping Gpibpc06 (p-value 0.751)
Dropping GEmp_Tra06_pc (p-value 0.438)
Dropping Emp_Com06_pc (p-value 0.321)
Dropping VConst (p-value 0.308)
Dropping VEstOt06_pc (p-value 0.438)
Dropping GPar06_pc (p-value 0.211)
Dropping GEstTrans06_pc (p-value 0.393)
Dropping EstTrans06_pc (p-value 0.726)
Dropping VPar06_pc (p-value 0.347)
Dropping VEstTrans06_pc (p-value 0.355)
Dropping GEstCom06_pc (p-value 0.282)
Dropping GEmp_Ind06_pc (p-value 0.279)
Dropping Par06_pc (p-value 0.141)
Dropping GEstHos06_pc (p-value 0.126)
Model 2: OLS, using observations 1-250 (n = 192)
Missing or incomplete observations dropped: 58
Dependent variable: renta2006
coefficient std. error t-ratio p-value
---------------------------------------------------------------
const 15135.2 517.080 29.27 2.34e-66 ***
pibpc06 0.0905194 0.0330375 2.740 0.0068 ***
GasT06_pc -7.08718 2.86912 -2.470 0.0145 **
GasCo06_pc 6.78625 3.00902 2.255 0.0255 **
GasCa06_pc 7.09263 2.87351 2.468 0.0146 **
EstIndu06_pc -20.3169 7.95165 -2.555 0.0115 **
EstCons06_pc -98.3470 21.5002 -4.574 9.49e-06 ***
EstCom06_pc 36.0169 17.2788 2.084 0.0387 **
EstHos06_pc -152.694 60.9441 -2.505 0.0132 **
Emp_Ind06_pc -7042.73 2985.53 -2.359 0.0195 **
Emp_Hos06_pc 33214.6 7775.64 4.272 3.31e-05 ***
Emp_Tra06_pc -13461.2 6337.52 -2.124 0.0352 **
Emp_OtS06_pc -12023.7 4034.46 -2.980 0.0033 ***
Vpibpc06 -0.330523 0.0836043 -3.953 0.0001 ***
GGasT06_pc 7.87246 3.26083 2.414 0.0169 **
VGasCo06_pc -1.56709 0.836233 -1.874 0.0627 *
GGasCo06_pc -8.21540 3.45846 -2.375 0.0187 **
GGasCa06_pc -7.56213 3.27700 -2.308 0.0223 **
VEstIndu06_pc 45.3765 25.9637 1.748 0.0824 *
VEstCom06_pc -253.867 50.2312 -5.054 1.16e-06 ***
VEstHos06_pc 404.973 119.907 3.377 0.0009 ***
VEstInte06_pc 337.274 37.2952 9.043 4.66e-16 ***
GEstInte06_pc 77.9347 41.3700 1.884 0.0614 *
VEmp_Ind06_pc 26611.5 7197.75 3.697 0.0003 ***
VEmp_Con06_pc 19243.0 6553.58 2.936 0.0038 ***
VEmp_Com06_pc 21961.8 7255.67 3.027 0.0029 ***
GEmp_Hos06_pc -45979.9 15967.2 -2.880 0.0045 ***
VEmp_Tra06_pc 28686.6 8682.05 3.304 0.0012 ***
VEmp_Fin06_pc -16798.0 4463.15 -3.764 0.0002 ***
VEmp_OtS06_pc 40182.0 10340.9 3.886 0.0001 ***
VCarga06_pc 1209.91 729.530 1.658 0.0992 *
Mean dependent var 14207.78 S.D. dependent var 1869.337
Sum squared resid 2.82e+08 S.E. of regression 1323.776
R-squared 0.577286 Adjusted R-squared 0.498520
F(30, 161) 7.329075 P-value(F) 7.76e-18
Log-likelihood -1635.674 Akaike criterion 3333.348
Schwarz criterion 3434.331 Hannan-Quinn 3374.247
Comparison of Model 1 and Model 2:
Null hypothesis: the regression parameters are zero for the variables
capital, EstTrans06_pc, EstInte06_pc, EstOt06_pc, Emp_Con06_pc,
Emp_Com06_pc, Emp_Fin06_pc, Turis06_pc, Carga06_pc, Par06_pc,
Gpibpc06, VGasT06_pc, VGasCa06_pc, GEstIndu06_pc, VEstCons06_pc,
GEstCons06_pc, GEstCom06_pc, GEstHos06_pc, VEstTrans06_pc,
GEstTrans06_pc,
VEstOt06_pc, GEstOt06_pc, GEmp_Ind06_pc, GEmp_Con06_pc, GEmp_Com06_pc,
VEmp_Hos06_pc, GEmp_Tra06_pc, GEmp_Fin06_pc, GEmp_OtS06_pc,
VTuris06_pc,
GTuris06_pc, GCarga06_pc, VPar06_pc, GPar06_pc, VConst, GConst
Test statistic: F(36, 125) = 0.599797, with p-value = 0.96105
Of the 3 model selection statistics, 3 have improved.
? list XL2 = $xlist
Generated list XL2
? list XL2 print
const capital pibpc06 GasT06_pc GasCo06_pc GasCa06_pc EstIndu06_pc \
EstCons06_pc EstCom06_pc EstHos06_pc EstTrans06_pc EstInte06_pc \
EstOt06_pc Emp_Ind06_pc Emp_Con06_pc Emp_Com06_pc Emp_Hos06_pc \
Emp_Tra06_pc Emp_Fin06_pc Emp_OtS06_pc Turis06_pc Carga06_pc Par06_pc \
Vpibpc06 Gpibpc06 VGasT06_pc GGasT06_pc VGasCo06_pc GGasCo06_pc \
VGasCa06_pc GGasCa06_pc VEstIndu06_pc GEstIndu06_pc VEstCons06_pc \
GEstCons06_pc VEstCom06_pc GEstCom06_pc VEstHos06_pc GEstHos06_pc \
VEstTrans06_pc GEstTrans06_pc VEstInte06_pc GEstInte06_pc VEstOt06_pc \
GEstOt06_pc VEmp_Ind06_pc GEmp_Ind06_pc VEmp_Con06_pc GEmp_Con06_pc \
VEmp_Com06_pc GEmp_Com06_pc VEmp_Hos06_pc GEmp_Hos06_pc VEmp_Tra06_pc \
GEmp_Tra06_pc VEmp_Fin06_pc GEmp_Fin06_pc VEmp_OtS06_pc GEmp_OtS06_pc \
VTuris06_pc GTuris06_pc VCarga06_pc GCarga06_pc VPar06_pc GPar06_pc \
VConst GConst
? quit
Script done
</output>
--
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.ea3.ehu.es