SAS Procedures

Help using Base SAS procedures
BookmarkSubscribeRSS Feed
egarcia
Calcite | Level 5

How does SAS calculate 'xbeta' output in proc logistic? I am using censored data and the Heckman Two-Step method to run a regression analysis, so here's the dilemma:

Heckman Two-Step Method:

1. Regress binary censored variable (eq 1 if censored, 0 otherwise) on RHS variables.

     proc logistic data=all_data;

          model censored = RHS_variables / link=probit;

          output out=probit xbeta=xbeta stdxbeta=stdxbeta;

     run;

2. Regress dependent variables of interest on RHS variables and Inverse Mills Ratio of (-Xi(beta/sigma))

     data probit;

          set probit;

          imr=pdf('NORMAL', xbeta)/cdf('NORMAL',xbeta);

          label imr='Inverse Mills Ratio';

     run;

     proc reg data=probit;

          model dep_var=RHS_variables imr / acov;

          where censored=1;

          output out=heckman;

     run; quit;

Essentially, is xbeta (calculated by SAS) equal to (-Xi(beta/sigma))? If so, then the above code is accurate. If not, then how do I calculate (-Xi(beta/sigma))?

Thank you for your help,

1 REPLY 1
SteveDenham
Jade | Level 19

In PROC LOGISTIC, xbeta contains the estimates of the linear predictor.  It is not scaled by sigma, I beleve you will have to divide through by the pooled error estimate to get what you need.

Steve Denham

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 5318 views
  • 2 likes
  • 2 in conversation