The MODEL Procedure

Example 25.15 Simulated Method of Moments—Simple Linear Regression

(View the complete code for this example.)

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 second moment of are compared with those of the observed endogenous variable y:

title "Simple regression model";

data regdata;
   do i=1 to 500;
      x = rannor( 1013 );
      Y = 2 + 1.5 * x + 1.5 * rannor( 1013 );
      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;

Alternatively, the MOMENT statement can be used to specify the moments using the following syntax:

proc model data=regdata;
   parms a b s;
   instrument x;

   ysim = (a+b*x) + s * rannor( 8003 );
   y = ysim;
   moment y = (2);

   fit y / gmm ndraw;
   bound s > 0;
run;

The output of the MODEL procedure is shown in Output 25.15.1.

Output 25.15.1: PROC MODEL Output

Simple regression model

The MODEL Procedure

Model Summary
Model Variables1
Parameters3
Equations2
Number of Statements4

Model VariablesY
Parametersa b s
Equationsysq Y

The 2 Equations to Estimate
Y =F(a(1), b(x), s)
ysq =F(a, b, s)
Instruments1 x

Nonlinear GMM Parameter Estimates
ParameterEstimateApprox Std Errt ValueApprox
Pr > |t|
a2.0659830.065731.45<.0001
b1.5110750.056526.73<.0001
s1.4833580.049829.78<.0001