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

Morning,

 

We do not have much experience with PROC QLIM but needed to use it to get a Mills ratio.  Our dependent variable has 2 values (0,1) and here is our code.

 

proc qlim data= &indata. ;
model MA_ENROLL = <list of variables> / discrete(d=normal);
output out=in.prob_enroll_&indata. marginal mills prob xbeta;
run;

 

The results of this model are: 

tbell_0-1615223960372.png

We did the same using PROC Logistic -- for which we are very familiar.  We got the same results for the dependent variable = 1.  But got 1-p results for dependent variable = 0.  And these results are more expected given the data.  

 

So it appears the the above table from QLIM (peach color cell) is the probability of the dependent variable being 0 for observations when the dependent variable is 0.  And not the probability of the dependent variable being 1 for observations when the dependent variable is 0.

 

Thanks in advance for help. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
tbell
Fluorite | Level 6
Thanks Dave,

Will try that -- currently the system with the data is down at the moment, but will try that asap. And will "accept as solution" if this works. 🙂

View solution in original post

7 REPLIES 7
tbell
Fluorite | Level 6

I forgot to include the logistic results for comparison.

 

tbell_0-1615224698049.png

 

ballardw
Super User

It might not hurt to provide the Proc Logistic Code as well.

 

You might test your hypothesis by changing the reference value in proc logistic.

tbell
Fluorite | Level 6
Thanks. Here is the form of the logistic code:

proc logistic DESCENDING data = newdata;
model y = x1 /link=probit;
output out=predict2 pred=phat;
run;
StatDave
SAS Super FREQ

PROC LOGISTIC models the probability of the first sorted response level by default, which means 0 for a 0/1 response variable. I believe QLIM expects a 0/1 response variable and always models the probability of 1. If you can to model the probability of 1 in PROC LOGISTIC, specify the EVENT="1" response option:  model y(event="1") = ... 

tbell
Fluorite | Level 6
Thanks. We used the DESCENDING option in Logistic so I think we are getting probability of 1. And that is what we want. But how do we get the same in QLIM?
StatDave
SAS Super FREQ

Try the PROBALL option in the OUTPUT statement instead of the PROB option. One of the two resulting columns should match the predicted probabilities output by PROC LOGISTIC.

tbell
Fluorite | Level 6
Thanks Dave,

Will try that -- currently the system with the data is down at the moment, but will try that asap. And will "accept as solution" if this works. 🙂

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.

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
  • 7 replies
  • 1331 views
  • 0 likes
  • 3 in conversation