BookmarkSubscribeRSS Feed
LzEr23
Obsidian | Level 7

Dear all,

 

I am trying to run a GMM estimation with some given moment conditions.

The dependent variable is "dp" which indicates the delta price.

The two explanatory variables are an indicator dummy and volume data.

I also use the lagged terms for indicator dummy (x) and volume data (v) variables, so I guess there are in fact four explanatory variables in total.

 

Below is the current SAS codes that I've written.

Problem is I constantly see that the overidentification test is rejected at 1% level.

So, I got to suspect that there may be some problems with the model.

 

The regression model is:

pricet - pricet-1 = dpt = a1*vt*(xt-p*xt-1) + a2*(xt-xt-1) + a3*(xt*vt-xt-1*vt-1)+ut

 

I adopt two moment conditions:

E[xt*xt-1 - p*xt-1xt-1] = 0

E[ut-c]=0

 

Now, assuming the constant (c) is zero, we get

u = dp- {a1*vt*(xt-p*xt-1) + a2*(xt-xt-1) + a3*(xt*vt-xt-1*vt-1)}

 

So, my codes go as follows:

proc model data=lib.have;
	parms a1 a2 a3 p;
	endogenous dp;
	instruments x x_1 v v_1;
	eq.m1=x_1*x-p*x_1*x_1;
	eq.m2=dp-(a1*v*(x-p*x_1)+a2*(x-x_1)+a3*(x*v-x_1*v_1));
	fit m1 m2 / gmm;
run;

 

I am not sure if I am putting in the right moment conditions, because the overidentification is repeatedly rejected..

 

So, my questions are,

Is this correctly coded?

Is there any other proper method to code the gmm estimation? If so, please give me an example. (it doesn't have to be using the model procedure)

Additionally, is there any way that I can run two-step gmm using proc model? (If not, how can I?)

 

Thanks in advance for any who reply my question.

It would be so helpful if anyone can help me on this.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 444 views
  • 0 likes
  • 1 in conversation