From: us g on
Hello all,

I need some help in estimating the inverse Mills ration for use in a
Heckman 2-stage model using SAS.

I have a repeated neasures dataset and use the proc GenMod to create
the probabiilties for an event to occur (binary variable) using a
tobit link function. Once the probabilities for each observation are
obtained, I calculate the “inverse Mills ratio” which will then used
in the 2nd stage as an additional explanatory variale.

The question is how to calculate the inverse mills ratio (IMR) which
is defined as the ratio between the Probability density function
(PDF) over the cumulative density function (CDF) associated with the
tobit probabilities.

Does the SAS code below create the IMR properly?

/* First Stage PROBIT Model With Panel Data & Firm Fixed effects*/

PROC GENMOD DATA= myData DESCENDING;
CLASS FID Year;
Model BinVar= exVar1 exVar2
/ dist = Binomial link=probit MAXITER = 1000 ;
REPEATED subject=FID / WITHIN=Year;
OUTPUT OUT=myData PROB=PbinVar;
RUN;

/*calculate inverse mills ratio */

data myData ;
set myData ;
IMR = pdf('NORMAL',PbinVar ) / cdf('NORMAL',PbinVar );
run;


Thanks in advance!