BookmarkSubscribeRSS Feed
SASNovice2014
Calcite | Level 5

Hello,

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).

PROC GENMOD DATA=my_filename descending;

CLASS case_number company_id;

model completed = X1*X2   X1   X2   X3   X4

Year1993 Year1994   Year1995  Year1996  Year1997 

/DIST=bin LINK=logit;

REPEATED subject=company_id /TYPE=ar(1)    ;

run;

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.  Hence, I need to control for sample selection bias (endogeneity) using the 2-stage Heckman (1979) procedure.  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. 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).

*/Stage 1 Heckman test - Probit specification with self-selection /*

PROC GENMOD DATA=my_filename descending;

CLASS case_number company_id;

model HighAcq_dum = X1   X2   X4   CatVar

Year1993   Year1994   Year1995  Year1996  Year1997 

/DIST=bin LINK=probit;

REPEATED subject=company_id /TYPE=ar(1)  ;

output out=my_filename.heck   prob=pcompleted ;

run;

/*calculate inverse mills ratio */

data my_filename.heck ;

set my_filename.heck ;

IMR =  pdf('NORMAL', pcompleted ) / cdf('NORMAL', pcompleted ); run;

/*Stage 2 Heckman test - Include IMR into GEE logit outcome equation*/

PROC GENMOD DATA= my_filename.heck  descending;

CLASS case_number company_id;

model completed = X1*X2   X1   X2   X3 X4    IMR

Year1993 Year1994   Year1995  Year1996  Year1997 

/DIST=bin LINK=logit;

REPEATED subject=company_id /TYPE=ar(1)  ; run;

 

(1) 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?


     Thanks for your help!

   

     Best,

     Elizabeth

1 REPLY 1

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1 reply
  • 2375 views
  • 0 likes
  • 2 in conversation