Dataset:
https://raw.githubusercontent.com/srk7774/data/refs/heads/master/table10....
Hi,
Is there anyway we can get newey-west standard errors in gretl? HAC robust errors are
differing slightly with textbook result.
Text book result:
Dependent Variable: LCONSUMPTION Method: Least Squares
Sample: 1947-2000 Included observations: 54
Newey-West HAC Standard Errors & Covariance (lag truncation = 3)
Variable Coefficient Std. Error t-Statistic Prob.
CONSTAN -0.467714 0.043937 -10.64516 0.0000
LINCOME 0.804871 0.017117 47.02132 0.0000
LWEALTH 0.201272 0.015447 13.02988 0.0000
INTEREST -0.002689 0.000880 -3.056306 0.0036
Statistic Value Statistic Value
R-squared 0.999560 Mean dependent var. 7.826093
Adjusted R-squared 0.999533 S.D. dependent var. 0.552368
S.E. of regression 0.011934 F-statistic 37832.71
Sum squared resid. 0.007121 Prob. (F-statistic) 0.000000
Durbin-Watson stat. 1.289237
Gretl result:
Model 10: OLS, using observations 1947-2000 (T = 54)
Dependent variable: l_C_expenditure
HAC standard errors, bandwidth 2, Bartlett kernel
coefficient std. error z p-value
-------------------------------------------------------------
const −0.467711 0.0458627 −10.20 2.02e-024 ***
Interest −0.00268906 0.000879808 −3.056 0.0022 ***
l_Yd_income 0.804873 0.0171749 46.86 0.0000 ***
l_W_wealth 0.201270 0.0160382 12.55 4.00e-036 ***
Mean dependent var 7.826093 S.D. dependent var 0.552368
Sum squared resid 0.007121 S.E. of regression 0.011934
R-squared 0.999560 Adjusted R-squared 0.999533
F(3, 50) 23576.95 P-value(F) 9.64e-79
Log-likelihood 164.5880 Akaike criterion −321.1760
Schwarz criterion −313.2201 Hannan-Quinn −318.1077
rho 0.324678 Durbin-Watson 1.289219
Log-likelihood for C_expenditure = −258.021