Example 18.15 Simulated Method of Moments—Simple Linear Regression
This example illustrates how to use SMM to estimate a simple linear regression model for the following process:
In the following SAS statements,
is simulated, and the first moment and the second moment of
are compared with those of the observed endogenous variable
.
title "Simple regression model";
data regdata;
do i=1 to 500;
x = rannor( 1013 );
Y = 2 + 1.5 * x + 1.5 * rannor( 9871 );
output;
end;
run;
proc model data=regdata;
parms a b s;
instrument x;
ysim = (a+b*x) + s * rannor( 8003 );
y = ysim;
eq.ysq = y*y - ysim*ysim;
fit y ysq / gmm ndraw;
bound s > 0;
run;
The output of the MODEL procedure is shown in Output 18.15.1:
Output 18.15.1
PROC MODEL Output
F(a(1), b(x), s) |
F(a, b, s) |
1 x |
2.065983 |
0.0657 |
31.45 |
<.0001 |
1.511075 |
0.0565 |
26.73 |
<.0001 |
1.483358 |
0.0498 |
29.78 |
<.0001 |