<?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 Re: 2-stage Heckman (1979) procedure in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/2-stage-Heckman-1979-procedure/m-p/189715#M9859</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see: &lt;A _jive_internal="true" href="https://communities.sas.com/message/227949#227949"&gt;https://communities.sas.com/message/227949#227949&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Sep 2014 18:47:20 GMT</pubDate>
    <dc:creator>udo_sas</dc:creator>
    <dc:date>2014-09-10T18:47:20Z</dc:date>
    <item>
      <title>2-stage Heckman (1979) procedure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/2-stage-Heckman-1979-procedure/m-p/189714#M9858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;I need some help with Heckman’s (1979) 2-stage procedure using a binary dependent variable. Let’s say I regress Y on several explanatory variables using SAS PROC GENMOD (GEE Logit). Y is a binary variable, and refers to the decision to complete or abandon an acquisition (completed=1, abandon=0).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;PROC GENMOD DATA=my_filename descending; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;CLASS case_number company_id; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;model completed = X1*X2&amp;nbsp;&amp;nbsp; X1&amp;nbsp;&amp;nbsp; X2&amp;nbsp;&amp;nbsp; X3&amp;nbsp;&amp;nbsp; X4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;Year1993 Year1994&amp;nbsp;&amp;nbsp; Year1995&amp;nbsp; Year1996&amp;nbsp; Year1997&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt; /DIST=bin LINK=logit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;REPEATED subject=company_id /TYPE=ar(1)&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;The decision to complete or abandon an acquisition may be an endogenous one, in that firms may make the decision to complete the acquisition based on expectations of economic uncertainty, which cannot be measured and cannot be included in the regression equation.&amp;nbsp; Hence, I need to control for sample selection bias (endogeneity) using the 2-stage Heckman (1979) procedure.&amp;nbsp; Sartori (2003) recommends using the exclusion restriction procedure, in which an additional meaningful variable is added to the first-stage selection equation but not to the second-stage equation. In line with this, in the first-stage probit model, I included a categorical variable (CatVar) to satisfy the exclusion restriction requirement. &lt;/SPAN&gt;For stage 1, I calculated high acquisition experience dummy variable (1 if the number of previous acquisitions over the past 5 years is greater than the average, 0 if it did not), which served as the dependent variable in the probit model. Since I get the error message "Error in computing the variance function" when I run the Stage 1, I removed explanatory variable X3 which appears to have high collinearity with the dependent variable (HighAcq_dum).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;*/Stage 1 Heckman test - Probit specification with self-selection /*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;PROC GENMOD DATA=my_filename descending; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;CLASS case_number company_id; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;model HighAcq_dum = X1&amp;nbsp;&amp;nbsp; X2&amp;nbsp;&amp;nbsp; X4&amp;nbsp;&amp;nbsp; CatVar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;Year1993&amp;nbsp;&amp;nbsp; Year1994&amp;nbsp;&amp;nbsp; Year1995&amp;nbsp; Year1996&amp;nbsp; Year1997&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt; /DIST=bin LINK=probit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;REPEATED subject=company_id /TYPE=ar(1)&amp;nbsp; ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;output out=my_filename.heck&amp;nbsp;&amp;nbsp; prob=pcompleted ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;/*calculate inverse mills ratio */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;data my_filename.heck ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;set my_filename.heck ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;IMR =&amp;nbsp; pdf('NORMAL', pcompleted ) / cdf('NORMAL', pcompleted ); run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;/*Stage 2 Heckman test - Include IMR into GEE logit outcome equation*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;PROC GENMOD DATA= my_filename.heck&amp;nbsp; descending; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;CLASS case_number company_id; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;model completed = X1*X2&amp;nbsp;&amp;nbsp; X1&amp;nbsp;&amp;nbsp; X2&amp;nbsp;&amp;nbsp; X3 X4&amp;nbsp;&amp;nbsp;&amp;nbsp; IMR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;Year1993 Year1994&amp;nbsp;&amp;nbsp; Year1995&amp;nbsp; Year1996&amp;nbsp; Year1997&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt; /DIST=bin LINK=logit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121;"&gt;REPEATED subject=company_id /TYPE=ar(1)&amp;nbsp; ; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P style="text-indent: -0.25in;"&gt;&lt;SPAN style="color: #212121;"&gt;(1)&lt;/SPAN&gt; &lt;SPAN style="color: #212121;"&gt;Would you please let me know if the above SAS codes to execute 2-stage Heckman test are correct? If not, what needs to be changed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -0.25in;"&gt;&lt;SPAN style="color: #212121;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -0.25in;"&gt;&lt;SPAN style="color: #212121;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -0.25in;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="text-indent: -0.25in;"&gt;&lt;SPAN style="color: #212121;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -0.25in;"&gt;&lt;SPAN style="color: #212121;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Elizabeth&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Sep 2014 06:39:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/2-stage-Heckman-1979-procedure/m-p/189714#M9858</guid>
      <dc:creator>SASNovice2014</dc:creator>
      <dc:date>2014-09-07T06:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: 2-stage Heckman (1979) procedure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/2-stage-Heckman-1979-procedure/m-p/189715#M9859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see: &lt;A _jive_internal="true" href="https://communities.sas.com/message/227949#227949"&gt;https://communities.sas.com/message/227949#227949&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 18:47:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/2-stage-Heckman-1979-procedure/m-p/189715#M9859</guid>
      <dc:creator>udo_sas</dc:creator>
      <dc:date>2014-09-10T18:47:20Z</dc:date>
    </item>
  </channel>
</rss>

