Re: [Gretl-users] RES: Gretl crash
by Allin Cottrell
On Thu, 25 Nov 2010, Bruno Thiago Tomio wrote:
> It was not thru script or prompt (console). I have used the windows
> interface to run the unit root test (ADF test) with the variable X. Then a
> window prompts and you can choose to run the test with constant and trend,
> where the default is with constante. When I try to click the button to
> choose constant and trend, it crashes...
Please make sure you're using the latest build of gretl from
http://gretl.sourceforge.net/win32/
I think that what you describe was a temporary problem in CVS.
Allin Cottrell
14 years, 11 months
Gretl crashes when running a series of TSLS regressions via script
by Yangbo Du
? open /home/yangbodu/Documents/Current/Econ/14.33/HDI_delta.gdt
Read datafile /home/yangbodu/Documents/Current/Econ/14.33/HDI_delta.gdt
periodicity: 1, maxobs: 40
observations range: 1971-2010
Listing 317 variables:
0) const 1) AUS_leb 2) AUT_leb 3) BEL_leb 4) CYP_leb
5) CZE_leb 6) DNK_leb 7) ESP_leb 8) EST_leb 9) FIN_leb
10) FRA_leb 11) DEU_leb 12) GRC_leb 13) HUN_leb 14) IRL_leb
15) ITA_leb 16) JPN_leb 17) KOR_leb 18) LTA_leb 19) LTU_leb
20) LUX_leb 21) MLT_leb 22) NLD_leb 23) POL_leb 24) PRT_leb
25) SVK_leb 26) SVN_leb 27) SWE_leb 28) GBR_leb 29) USA_leb
30) AUS_edu 31) AUT_edu 32) BEL_edu 33) CYP_edu 34) CZE_edu
35) DNK_edu 36) ESP_edu 37) EST_edu 38) FIN_edu 39) FRA_edu
40) DEU_edu 41) GRC_edu 42) HUN_edu 43) IRL_edu 44) ITA_edu
45) JPN_edu 46) KOR_edu 47) LTA_edu 48) LTU_edu 49) LUX_edu
50) MLT_edu 51) NLD_edu 52) POL_edu 53) PRT_edu 54) SVK_edu
55) SVN_edu 56) SWE_edu 57) GBR_edu 58) USA_edu 59) AUS_inc
60) AUT_inc 61) BEL_inc 62) CYP_inc 63) CZE_inc 64) DNK_inc
65) ESP_inc 66) EST_inc 67) FIN_inc 68) FRA_inc 69) DEU_inc
70) GRC_inc 71) HUN_inc 72) IRL_inc 73) ITA_inc 74) JPN_inc
75) KOR_inc 76) LTA_inc 77) LTU_inc 78) LUX_inc 79) MLT_inc
80) NLD_inc 81) POL_inc 82) PRT_inc 83) SVK_inc 84) SVN_inc
85) SWE_inc 86) GBR_inc 87) USA_inc 88) AUS_u5m 89) AUT_u5m
90) BEL_u5m 91) CYP_u5m 92) CZE_u5m 93) DNK_u5m 94) ESP_u5m
95) EST_u5m 96) FIN_u5m 97) FRA_u5m 98) DEU_u5m 99) GRC_u5m
100) HUN_u5m 101) IRL_u5m 102) ITA_u5m 103) JPN_u5m 104) KOR_u5m
105) LTA_u5m 106) LTU_u5m 107) LUX_u5m 108) MLT_u5m 109) NLD_u5m
110) POL_u5m 111) PRT_u5m 112) SVK_u5m 113) SVN_u5m 114) SWE_u5m
115) GBR_u5m 116) USA_u5m 117) AUS_flp 118) AUT_flp 119) BEL_flp
120) CYP_flp 121) CZE_flp 122) DNK_flp 123) ESP_flp 124) EST_flp
125) FIN_flp 126) FRA_flp 127) DEU_flp 128) GRC_flp 129) HUN_flp
130) IRL_flp 131) ITA_flp 132) JPN_flp 133) KOR_flp 134) LTA_flp
135) LTU_flp 136) LUX_flp 137) MLT_flp 138) NLD_flp 139) POL_flp
140) PRT_flp 141) SVK_flp 142) SVN_flp 143) SWE_flp 144) GBR_flp
145) USA_flp 146) AUS_urb 147) AUT_urb 148) BEL_urb 149) CYP_urb
150) CZE_urb 151) DNK_urb 152) ESP_urb 153) EST_urb 154) FIN_urb
155) FRA_urb 156) DEU_urb 157) GRC_urb 158) HUN_urb 159) IRL_urb
160) ITA_urb 161) JPN_urb 162) KOR_urb 163) LTA_urb 164) LTU_urb
165) LUX_urb 166) MLT_urb 167) NLD_urb 168) POL_urb 169) PRT_urb
170) SVK_urb 171) SVN_urb 172) SWE_urb 173) GBR_urb 174) USA_urb
175) AUS_nom 176) AUT_nom 177) BEL_nom 178) CYP_nom 179) CZE_nom
180) DNK_nom 181) ESP_nom 182) EST_nom 183) FIN_nom 184) FRA_nom
185) DEU_nom 186) GRC_nom 187) HUN_nom 188) IRL_nom 189) ITA_nom
190) JPN_nom 191) KOR_nom 192) LTA_nom 193) LTU_nom 194) LUX_nom
195) MLT_nom 196) NLD_nom 197) POL_nom 198) PRT_nom 199) SVK_nom
200) SVN_nom 201) SWE_nom 202) GBR_nom 203) USA_nom 204) AUS_real
205) AUT_real 206) BEL_real 207) CYP_real 208) CZE_real 209) DNK_real
210) ESP_real 211) EST_real 212) FIN_real 213) FRA_real 214) DEU_real
215) GRC_real 216) HUN_real 217) IRL_real 218) ITA_real 219) JPN_real
220) KOR_real 221) LTA_real 222) LTU_real 223) LUX_real 224) MLT_real
225) NLD_real 226) POL_real 227) PRT_real 228) SVK_real 229) SVN_real
230) SWE_real 231) GBR_real 232) USA_real 233) AUS_lebh 234) AUT_lebh
235) BEL_lebh 236) CYP_lebh 237) CZE_lebh 238) DNK_lebh 239) ESP_lebh
240) EST_lebh 241) FIN_lebh 242) FRA_lebh 243) GRC_lebh 244) HUN_lebh
245) IRL_lebh 246) ITA_lebh 247) JPN_lebh 248) KOR_lebh 249) LTA_lebh
250) LTU_lebh 251) LUX_lebh 252) MLT_lebh 253) NLD_lebh 254) POL_lebh
255) PRT_lebh 256) SVK_lebh 257) SVN_lebh 258) SWE_lebh 259) GBR_lebh
260) USA_lebh 261) AUS_eduh 262) AUT_eduh 263) BEL_eduh 264) CYP_eduh
265) CZE_eduh 266) DNK_eduh 267) ESP_eduh 268) EST_eduh 269) FIN_eduh
270) FRA_eduh 271) GRC_eduh 272) HUN_eduh 273) IRL_eduh 274) ITA_eduh
275) JPN_eduh 276) KOR_eduh 277) LTA_eduh 278) LTU_eduh 279) LUX_eduh
280) MLT_eduh 281) NLD_eduh 282) POL_eduh 283) PRT_eduh 284) SVK_eduh
285) SVN_eduh 286) SWE_eduh 287) GBR_eduh 288) USA_eduh 289) AUS_inch
290) AUT_inch 291) BEL_inch 292) CYP_inch 293) CZE_inch 294) DNK_inch
295) ESP_inch 296) EST_inch 297) FIN_inch 298) FRA_inch 299) GRC_inch
300) HUN_inch 301) IRL_inch 302) ITA_inch 303) JPN_inch 304) KOR_inch
305) LTA_inch 306) LTU_inch 307) LUX_inch 308) MLT_inch 309) NLD_inch
310) POL_inch 311) PRT_inch 312) SVK_inch 313) SVN_inch 314) SWE_inch
315) GBR_inch 316) USA_inch
#AUS
? tsls AUS_nom const AUS_lebh AUS_eduh AUS_inch ; const AUS_u5m AUS_flp \
AUS_urb
Model 1: TSLS, using observations 1980-2006 (T = 9)
Missing or incomplete observations dropped: 18
Dependent variable: AUS_nom
Instrumented: AUS_lebh AUS_eduh AUS_inch
Instruments: const AUS_u5m AUS_flp AUS_urb
coefficient std. error z p-value
-------------------------------------------------------
const 0.528844 0.598875 0.8831 0.3772
AUS_lebh -1.04600 2.45215 -0.4266 0.6697
AUS_eduh -0.115336 0.325044 -0.3548 0.7227
AUS_inch 0.760027 3.11467 0.2440 0.8072
Mean dependent var 0.067184 S.D. dependent var 0.035078
Sum squared resid 0.002245 S.E. of regression 0.021190
R-squared 0.772517 Adjusted R-squared 0.636026
F(3, 5) 5.308006 P-value(F) 0.051761
Log-likelihood 158.3239 Akaike criterion -308.6478
Schwarz criterion -307.8589 Hannan-Quinn -310.3502
Hausman test -
Null hypothesis: OLS estimates are consistent
Asymptotic test statistic: Chi-square(3) = 14.2957
with p-value = 0.00252905
Weak instrument test -
Cragg-Donald minimum eigenvalue = 1.01031
Critical values for TSLS bias relative to OLS:
bias 5% 10% 20% 30%
value 0.00 0.00 0.00 0.00
Relative bias is probably less than 5%
? tsls AUS_real const AUS_lebh AUS_eduh AUS_inch ; const AUS_u5m AUS_flp \
AUS_urb
Model 2: TSLS, using observations 1980-2006 (T = 9)
Missing or incomplete observations dropped: 18
Dependent variable: AUS_real
Instrumented: AUS_lebh AUS_eduh AUS_inch
Instruments: const AUS_u5m AUS_flp AUS_urb
coefficient std. error z p-value
--------------------------------------------------------
const 1.55047 0.556491 2.786 0.0053 ***
AUS_lebh 4.96799 2.27860 2.180 0.0292 **
AUS_eduh 0.0280052 0.302039 0.09272 0.9261
AUS_inch -7.62803 2.89424 -2.636 0.0084 ***
Mean dependent var 0.021869 S.D. dependent var 0.028849
Sum squared resid 0.001939 S.E. of regression 0.019691
R-squared 0.709119 Adjusted R-squared 0.534590
F(3, 5) 4.142585 P-value(F) 0.080028
Log-likelihood 158.8953 Akaike criterion -309.7905
Schwarz criterion -309.0016 Hannan-Quinn -311.4930
Hausman test -
Null hypothesis: OLS estimates are consistent
Asymptotic test statistic: Chi-square(3) = 8.75196
with p-value = 0.0327771
Weak instrument test -
Cragg-Donald minimum eigenvalue = 1.01031
Critical values for TSLS bias relative to OLS:
bias 5% 10% 20% 30%
value 0.00 0.00 0.00 0.00
Relative bias is probably less than 5%
#AUT
? tsls AUT_nom const AUT_lebh AUT_eduh AUT_inch ; const AUT_u5m AUT_flp \
AUT_urb
Model 3: TSLS, using observations 1980-2006 (T = 25)
Missing or incomplete observations dropped: 2
Dependent variable: AUT_nom
Instrumented: AUT_lebh AUT_eduh AUT_inch
Instruments: const AUT_u5m AUT_flp AUT_urb
coefficient std. error z p-value
-------------------------------------------------------
const -0.309716 1.83756 -0.1685 0.8662
AUT_lebh -2.92628 6.26590 -0.4670 0.6405
AUT_eduh -0.279713 0.585100 -0.4781 0.6326
AUT_inch 4.00008 9.75192 0.4102 0.6817
Mean dependent var 0.034323 S.D. dependent var 0.023440
Sum squared resid 0.010213 S.E. of regression 0.022053
R-squared 0.279293 Adjusted R-squared 0.176335
F(3, 21) 4.226184 P-value(F) 0.017401
Log-likelihood 348.1448 Akaike criterion -688.2897
Schwarz criterion -683.4142 Hannan-Quinn -686.9374
Hausman test -
Null hypothesis: OLS estimates are consistent
Asymptotic test statistic: Chi-square(3) = 8.63549
with p-value = 0.0345511
Weak instrument test -
Cragg-Donald minimum eigenvalue = 0.302956
Critical values for TSLS bias relative to OLS:
bias 5% 10% 20% 30%
value 0.00 0.00 0.00 0.00
Relative bias is probably less than 5%
? tsls AUT_real const AUT_lebh AUT_eduh AUT_inch ; const AUT_u5m AUT_flp \
AUT_urb
Model 4: TSLS, using observations 1980-2006 (T = 25)
Missing or incomplete observations dropped: 2
Dependent variable: AUT_real
Instrumented: AUT_lebh AUT_eduh AUT_inch
Instruments: const AUT_u5m AUT_flp AUT_urb
coefficient std. error z p-value
-------------------------------------------------------
const 1.75753 2.11185 0.8322 0.4053
AUT_lebh 5.68873 7.20121 0.7900 0.4295
AUT_eduh 0.415856 0.672438 0.6184 0.5363
AUT_inch -9.00844 11.2076 -0.8038 0.4215
Mean dependent var 0.005327 S.D. dependent var 0.018095
Sum squared resid 0.013489 S.E. of regression 0.025345
R-squared 0.065870 Adjusted R-squared -0.067577
F(3, 21) 0.271789 P-value(F) 0.845025
Log-likelihood 346.4188 Akaike criterion -684.8376
Schwarz criterion -679.9621 Hannan-Quinn -683.4853
Hausman test -
Null hypothesis: OLS estimates are consistent
Asymptotic test statistic: Chi-square(3) = 3.86739
with p-value = 0.276144
Weak instrument test -
Cragg-Donald minimum eigenvalue = 0.302956
Critical values for TSLS bias relative to OLS:
bias 5% 10% 20% 30%
value 0.00 0.00 0.00 0.00
Relative bias is probably less than 5%
#BEL
? tsls BEL_nom const BEL_lebh BEL_eduh BEL_inch ; const BEL_u5m BEL_flp \
BEL_urb
Model 5: TSLS, using observations 1980-2006 (T = 7)
Missing or incomplete observations dropped: 20
Dependent variable: BEL_nom
Instrumented: BEL_lebh BEL_eduh BEL_inch
Instruments: const BEL_u5m BEL_flp BEL_urb
coefficient std. error z p-value
-------------------------------------------------------
const 0.976154 0.673408 1.450 0.1472
BEL_lebh 1.66878 8.15217 0.2047 0.8378
BEL_eduh 0.574319 0.697224 0.8237 0.4101
BEL_inch -3.69605 9.40962 -0.3928 0.6945
Mean dependent var 0.044285 S.D. dependent var 0.023588
Sum squared resid 0.002907 S.E. of regression 0.031127
R-squared 0.438459 Adjusted R-squared -0.123081
F(3, 3) 0.904151 P-value(F) 0.532032
Hausman test -
Null hypothesis: OLS estimates are consistent
Asymptotic test statistic: Chi-square(3) = inf
with p-value = nan
Weak instrument test -
Cragg-Donald minimum eigenvalue = 0.0691543
Critical values for TSLS bias relative to OLS:
bias 5% 10% 20% 30%
value 0.00 0.00 0.00 0.00
Relative bias is probably less than 5%
? tsls BEL_real const BEL_lebh BEL_eduh BEL_inch ; const BEL_u5m BEL_flp \
BEL_urb
Model 6: TSLS, using observations 1980-2006 (T = 7)
Missing or incomplete observations dropped: 20
Dependent variable: BEL_real
Instrumented: BEL_lebh BEL_eduh BEL_inch
Instruments: const BEL_u5m BEL_flp BEL_urb
coefficient std. error z p-value
-------------------------------------------------------
const 0.804548 0.555790 1.448 0.1477
BEL_lebh 4.41749 6.72830 0.6566 0.5115
BEL_eduh 0.556920 0.575445 0.9678 0.3331
BEL_inch -6.60878 7.76612 -0.8510 0.3948
Mean dependent var 0.012329 S.D. dependent var 0.019752
Sum squared resid 0.001980 S.E. of regression 0.025691
R-squared 0.671723 Adjusted R-squared 0.343445
F(3, 3) 1.019353 P-value(F) 0.493899
Hausman test -
Null hypothesis: OLS estimates are consistent
Asymptotic test statistic: Chi-square(3) = inf
with p-value = nan
Weak instrument test -
Cragg-Donald minimum eigenvalue = 0.0691543
Critical values for TSLS bias relative to OLS:
bias 5% 10% 20% 30%
value 0.00 0.00 0.00 0.00
Relative bias is probably less than 5%
#CYP
? tsls CYP_nom const CYP_lebh CYP_eduh CYP_inch ; const CYP_u5m CYP_flp \
CYP_urb
14 years, 11 months
Re: [Gretl-users] Gretl crash
by Allin Cottrell
On Thu, 25 Nov 2010, Bruno Thiago Tomio wrote:
> A problem occurs when I try to run a unit root test (ADF) with
> constant and trend with the attached file. I am running the last
> version under WinXP. The data is compiled as panel data.
Can you tell us precisely what tests you are doing? I tried the
following and could not provoke a problem (or find any evidence of
memory corruption using valgrind):
open Pasta1.xls
setobs Object Year --panel-vars
adf 0 X --ct
adf 0 Xgrowth --ct
adf 3 X --ct
adf 3 Xgrowth --ct
Allin Cottrell
14 years, 11 months
Gretl crash
by Bruno Thiago Tomio
Hello,
A problem occurs when I try to run a unit root test (ADF) with constant and
trend with the attached file. I am running the last version under WinXP. The
data is compiled as panel data.
Please what is wrong?
Many thanks,
Bruno
14 years, 11 months
Drop permanently observations
by Giuseppe Vittucci
Here is my problem.
I need to drop *permanently* observations.
The command smpl (--restrict) simply creates a sub sample but it does
not change the dataset range.
This causes the full range to reappear each time I use smpl --full in
the loops.
And I cannot save a restricted version of the dataset and then reopen it
cause I loose the session (in particular matrices, vectors and scalars).
Is there a way to really drop observations? I need the "reverse" of
addobs.
Thanks
Giuseppe
14 years, 11 months
Restricted VAR estimation
by Ofer Cornfeld
Hi,
What is the best way to estimate in Gretl restricted VAR?
That is, how to estimate a VAR models with some conditions imposed on the
parameters estimated?
With kind regards,
Ofer Cornfeld
TAU
14 years, 11 months
Re: [Gretl-users] WLS residuals
by Allin Cottrell
On Wed, 17 Nov 2010, Summers, Peter wrote:
> In trying to answer questions from some of my students, I did
> the following (using the data set "food.gdt" from Hill et al):
>
> 1) define x1 = 1/x
> 2) wls x1 y 0 x, save residuals uhat1
> 3) define ystar = y/sqrt(x), cstar = 1/sqrt(x), xstar =
> x/sqrt(x) (ie, wls "by hand")
> 4) ols ystar cstar xstar, save residuals uhat2
> (I actually used the gui, but replicated this with the console)
>
> I was surprised to find that uhat1 and uhat2 are different, even
> though the coefficient estimates are exactly the same. In fact,
> uhat2 = cstar*uhat1. Is this intended?
Yes, it's intended. The residuals we report from WLS are the same
as those reported by R. They represent the deviations of actual y
from the predictions for y generated by the coefficients of the
weighted model applied to actual X.
The following script illustrates the point.
<script>
open data4-1
series w = 1/sqft
wls w price 0 sqft
series u1 = $uhat
series chk1 = price - ($coeff[1] + $coeff[2]*sqft)
series ystar = price/sqrt(sqft)
series cstar = 1/sqrt(sqft)
series xstar = sqft/sqrt(sqft)
ols ystar cstar xstar
series u2 = $uhat
series chk2 = ystar - ($coeff[1]*cstar + $coeff[2]*xstar)
print u1 chk1 u2 chk2 -o
# compare R, if available
foreign language=R --send-data
y <- gretldata[,"price"]
x <- gretldata[,"sqft"]
w <- gretldata[,"w"]
model <- lm(y ~ x, weights=w)
model
model$residuals
end foreign
</script>
Allin Cottrell
14 years, 11 months
comparing two models
by remi sorama
Dear all,
I have a gretl session with four variables: y1,x1,y2,x2 and also two
regression models of y's on respective x's. I would like to compare these
two models with the Chow test, but it seems I have to reorganize my data
into two long vectors of y and x first. How can I do it?
Or isn't it the same as solving these two equations as a system and
applying Tests -> Linear restrictions, typing b[1,1]-b[2,1]=0 etc?
And what if I have not two but three firms?
Many thanks,
Rem
14 years, 11 months