Suppose there is a regression.
data have;
do t=1 to 5000;
x=rannor(1);
w=rannor(1);
y=x+w+rannor(1);
output;
end;
run;
PROC REG easily estimates the following three regressions.
proc reg;
model y=x;
model y=w;
model y=x w;
quit;
But I need to use a Newey–West standard error, i.e. PROC MODEL. I tried the following, which didn't work correctly.
proc model;
y=a+b*x;
fit y/gmm kernel=(bart,2,0) vardef=n;
y=c+d*w;
fit y/gmm kernel=(bart,2,0) vardef=n;
y=e+f*x+g*w;
fit y/gmm kernel=(bart,2,0) vardef=n;
quit;
Should one repeat PROC MODEL thrice to estimate the three regressions?