BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ZMX
Fluorite | Level 6 ZMX
Fluorite | Level 6

I was looking at the example below on the SAS website and I was wondering how to use the results of this model to predict unconditional wages (ie. E(w) versus E(w|inlf=1).

Are the wages predicted using the second regression conditional wage (ie. E(wage|inlf=1) )?

 

proc qlim data=mroz;
      model inlf = nwifeinc educ exper expersq
                   age kidslt6 kidsge6 /discrete;
      model lwage = educ exper expersq / select(inlf=1);
   run;

 Thanks for the help.

1 ACCEPTED SOLUTION

Accepted Solutions
SASCom1
SAS Employee

Hello @ZMX ,

 

You can obtain unconditional expected value and conditional expected values using the EXPECTED and CONDITOINAL options in the OUTPUT statement directly in PROC QLIM.

 

For the sample selection model, the PREDICTED value is equal to the EXPECTED value, which is also equal to the XBETA value for the continuous dependent variable in the main equation(lwage in the example). You can verify this by specifying the OUTPUT statement like below:

 

 output out = outdata expected xbeta predicted conditional mills ;

 

and look at the outdata data set.

 

The conditional expected value differs from the  expected/predicted/xbeta values by adding to it another term,  rho*sigma_lwage*Mills_inlf, in other words,

 

Predicted_lwage = Expected_lwage = xbeta_lwage  ;

Conditional_lwage = xbeta_lwage + rho*sigma_lwage*Mills_inlf ;

 

I hope this helps.

View solution in original post

3 REPLIES 3
SASCom1
SAS Employee

Hello @ZMX ,

 

You can obtain unconditional expected value and conditional expected values using the EXPECTED and CONDITOINAL options in the OUTPUT statement directly in PROC QLIM.

 

For the sample selection model, the PREDICTED value is equal to the EXPECTED value, which is also equal to the XBETA value for the continuous dependent variable in the main equation(lwage in the example). You can verify this by specifying the OUTPUT statement like below:

 

 output out = outdata expected xbeta predicted conditional mills ;

 

and look at the outdata data set.

 

The conditional expected value differs from the  expected/predicted/xbeta values by adding to it another term,  rho*sigma_lwage*Mills_inlf, in other words,

 

Predicted_lwage = Expected_lwage = xbeta_lwage  ;

Conditional_lwage = xbeta_lwage + rho*sigma_lwage*Mills_inlf ;

 

I hope this helps.

SASCom1
SAS Employee

@ZMX ,

 

Sorry, in my previous post, 'CONDITOINAL' is a typo, it should be CONDITIONAL 🙂 

ZMX
Fluorite | Level 6 ZMX
Fluorite | Level 6

It did help. Thank you for the response. 🙂

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1142 views
  • 2 likes
  • 2 in conversation