| The MODEL Procedure |
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:
| Model Summary | |
|---|---|
| Model Variables | 1 |
| Parameters | 3 |
| Equations | 2 |
| Number of Statements | 4 |
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.