sas
%let lag=3;*lags for Newey-West t-stat;
proc model data=FBny;
by model code name;
parms a; exogenous coef1 ;
instruments / intonly;
coef1 =a;
fit coef1 / gmm kernel=(bart, %eval(&lag+1), 0);
ods output parameterestimates=param1 fitstatistics=fitresult
OutputStatistics=residual;
quit;
本文来自: 人大经济论坛 SAS专版 版,详细出处参考: http://bbs.pinggu.org/forum.php?mod=viewthread&tid=1082569&page=1&fromuid=1508594
stata
reg ln_consum ln_income
est store ols
newey ln_consum ln_income , lag(1)
est store newey1
newey ln_consum ln_income , lag(2)
est store newey2
esttab ols newey1 newey2, b(%6.3f) se(%6.3f) mtitle(ols newey1 newey2)
本文来自: 人大经济论坛 Stata专版 版,详细出处参考: http://bbs.pinggu.org/forum.php?mod=viewthread&tid=416195&page=1&fromuid=1508594