BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LzEr23
Obsidian | Level 7

Dear all,

 

I'm trying to run an estimation of a model using GMM.

 

And I would be very grateful if someone can help me on this.

 

Problem is, the data are in time series, and I am having trouble in setting the moment equations.

 

response var: resv

independent vars: x1, x2, x3, x4, x5 c1

time series length = 20

observations = 20

 

proc model data=work.gmmtest;
parms a1 a2 a3 a4 a5 p r;
endogenous resv;
instruments x1 x2 x3 x4 x5 c1;
eq.m1= resv-p*lag(resv);
eq.m2=           .......       ;
fit m1 m2  .... / gmm;
run; quit;

 

This is the code I used.

I put the first equation m1 that way since I was expecting an autocorrelation.

But, from there, I am not sure what to put as a moment condition here.

 

How should I set up the moment equation there?

1 ACCEPTED SOLUTION

Accepted Solutions
kessler
SAS Employee

The moment conditions depend on the formulation of your model.  A simple model with a single moment condition which includes your 6 independent variables, 1 response variable, and an autocorrelated error term could be specified as:

 

proc model data=work.gmmtest;
   parms a1 a2 a3 a4 a5 p r;
   endogenous resv;
   instruments x1 x2 x3 x4 x5 c1;

   resvstruct = resv - (a1*x1 + a2*x2 + a3*x3 + a4*x4 + a5*x5 + r*c1);
   eq.m1= resvstruct -p*lag(resvstruct);
  
   fit m1  / gmm;
quit;

 

-Marc

View solution in original post

2 REPLIES 2
kessler
SAS Employee

The moment conditions depend on the formulation of your model.  A simple model with a single moment condition which includes your 6 independent variables, 1 response variable, and an autocorrelated error term could be specified as:

 

proc model data=work.gmmtest;
   parms a1 a2 a3 a4 a5 p r;
   endogenous resv;
   instruments x1 x2 x3 x4 x5 c1;

   resvstruct = resv - (a1*x1 + a2*x2 + a3*x3 + a4*x4 + a5*x5 + r*c1);
   eq.m1= resvstruct -p*lag(resvstruct);
  
   fit m1  / gmm;
quit;

 

-Marc

LzEr23
Obsidian | Level 7
Thank you. I did help.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Discussion stats
  • 2 replies
  • 995 views
  • 0 likes
  • 2 in conversation