Solved – Get the R2 from GMM Newey-West in SAS

I'm running a simple cross-sectional regression where I first run regressions for every year of observations and then I'm running this code to get the Newey-West corrected standard errors:

ods listing close; ods output parameterestimates=pe; proc reg data=dset;  by year;  model depvar = indvars; run; quit; ods listing;  proc means data=pe mean std t probt;  var estimate; class variable; run;  proc sort data=pe; by variable; run;  %let lags=3; ods output parameterestimates=nw; ods listing close; proc model data=pe;  by variable;  instruments / intonly;  estimate=a;  fit estimate / gmm kernel=(bart,%eval(&lags+1),0); run; quit; ods listing;  proc print data=nw; id variable;  var estimate--df; format estimate stderr 7.4; run; 

What's the best way to get the R2 once I correct for the standard errors for the cross-sectional regression?

Newey-West standard errors only change the estimates of the standard errors. Since the estimates of the coefficients themselves don't change, the $R^2$ of the model doesn't change.

Similar Posts:

Rate this post

Leave a Comment