<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GMM estimation with certain mome in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/GMM-estimation-with-certain-mome/m-p/692463#M33407</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to run a GMM estimation with some given moment conditions.&lt;/P&gt;
&lt;P&gt;The dependent variable is "dp" which indicates the delta price.&lt;/P&gt;
&lt;P&gt;The two explanatory variables are an indicator dummy and volume data.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the current SAS codes that I've written.&lt;/P&gt;
&lt;P&gt;Problem is I constantly see that the overidentification test is rejected at 1% level.&lt;/P&gt;
&lt;P&gt;So, I got to suspect that there may be some problems with the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The regression model is:&lt;/P&gt;
&lt;P&gt;price&lt;FONT size="2"&gt;t&lt;/FONT&gt; - price&lt;FONT size="2"&gt;t-1&lt;/FONT&gt; = dp&lt;FONT size="2"&gt;t&lt;/FONT&gt; = a1*v&lt;FONT size="2"&gt;t&lt;/FONT&gt;*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;-p*x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;) + a2*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;-x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;) + a3*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;*v&lt;FONT size="2"&gt;t&lt;/FONT&gt;-x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;*v&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;)+u&lt;FONT size="2"&gt;t&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I adopt two moment conditions:&lt;/P&gt;
&lt;P&gt;E[x&lt;FONT size="2"&gt;t&lt;/FONT&gt;*x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt; - p*x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;] = 0&lt;/P&gt;
&lt;P&gt;E[u&lt;FONT size="2"&gt;t&lt;/FONT&gt;-c]=0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, assuming the constant (c) is zero, we get&lt;/P&gt;
&lt;P&gt;u&lt;FONT size="2"&gt;t&amp;nbsp;&lt;/FONT&gt;&amp;nbsp;= dp&lt;FONT size="2"&gt;t&amp;nbsp;&lt;/FONT&gt;- {a1*v&lt;FONT size="2"&gt;t&lt;/FONT&gt;*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;-p*x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;) + a2*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;-x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;) + a3*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;*v&lt;FONT size="2"&gt;t&lt;/FONT&gt;-x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;*v&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;)}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, my codes go as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;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;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if I am putting in the right moment conditions, because the overidentification is repeatedly rejected..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, my questions are,&lt;/P&gt;
&lt;P&gt;Is this correctly coded?&lt;/P&gt;
&lt;P&gt;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)&lt;/P&gt;
&lt;P&gt;Additionally, is there any way that I can run two-step gmm using proc model? (If not, how can I?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any who reply my question.&lt;/P&gt;
&lt;P&gt;It would be so helpful if anyone can help me on this.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Oct 2020 09:52:13 GMT</pubDate>
    <dc:creator>LzEr23</dc:creator>
    <dc:date>2020-10-19T09:52:13Z</dc:date>
    <item>
      <title>GMM estimation with certain mome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GMM-estimation-with-certain-mome/m-p/692463#M33407</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to run a GMM estimation with some given moment conditions.&lt;/P&gt;
&lt;P&gt;The dependent variable is "dp" which indicates the delta price.&lt;/P&gt;
&lt;P&gt;The two explanatory variables are an indicator dummy and volume data.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the current SAS codes that I've written.&lt;/P&gt;
&lt;P&gt;Problem is I constantly see that the overidentification test is rejected at 1% level.&lt;/P&gt;
&lt;P&gt;So, I got to suspect that there may be some problems with the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The regression model is:&lt;/P&gt;
&lt;P&gt;price&lt;FONT size="2"&gt;t&lt;/FONT&gt; - price&lt;FONT size="2"&gt;t-1&lt;/FONT&gt; = dp&lt;FONT size="2"&gt;t&lt;/FONT&gt; = a1*v&lt;FONT size="2"&gt;t&lt;/FONT&gt;*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;-p*x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;) + a2*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;-x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;) + a3*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;*v&lt;FONT size="2"&gt;t&lt;/FONT&gt;-x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;*v&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;)+u&lt;FONT size="2"&gt;t&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I adopt two moment conditions:&lt;/P&gt;
&lt;P&gt;E[x&lt;FONT size="2"&gt;t&lt;/FONT&gt;*x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt; - p*x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;] = 0&lt;/P&gt;
&lt;P&gt;E[u&lt;FONT size="2"&gt;t&lt;/FONT&gt;-c]=0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, assuming the constant (c) is zero, we get&lt;/P&gt;
&lt;P&gt;u&lt;FONT size="2"&gt;t&amp;nbsp;&lt;/FONT&gt;&amp;nbsp;= dp&lt;FONT size="2"&gt;t&amp;nbsp;&lt;/FONT&gt;- {a1*v&lt;FONT size="2"&gt;t&lt;/FONT&gt;*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;-p*x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;) + a2*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;-x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;) + a3*(x&lt;FONT size="2"&gt;t&lt;/FONT&gt;*v&lt;FONT size="2"&gt;t&lt;/FONT&gt;-x&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;*v&lt;FONT size="2"&gt;t-1&lt;/FONT&gt;)}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, my codes go as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;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;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if I am putting in the right moment conditions, because the overidentification is repeatedly rejected..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, my questions are,&lt;/P&gt;
&lt;P&gt;Is this correctly coded?&lt;/P&gt;
&lt;P&gt;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)&lt;/P&gt;
&lt;P&gt;Additionally, is there any way that I can run two-step gmm using proc model? (If not, how can I?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any who reply my question.&lt;/P&gt;
&lt;P&gt;It would be so helpful if anyone can help me on this.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 09:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GMM-estimation-with-certain-mome/m-p/692463#M33407</guid>
      <dc:creator>LzEr23</dc:creator>
      <dc:date>2020-10-19T09:52:13Z</dc:date>
    </item>
  </channel>
</rss>

