BookmarkSubscribeRSS Feed
Crubal
Quartz | Level 8

Hi, 

 

I have the following code using Logistic Regression on this dependent variable 'Stay', 1 means customer did stay; 0 means customer didnot stay. And several independent variables as below: 

 

Proc Logistic Data=Work.Data1;
Class Member Travel_Agency;
Model Stay = Length_of_Stay Booking_Lead Member Travel_Agency Member*Travel_Agency / expb;
output out=Work.Data2 p=pi_hat;

Where Arrival_Date between '01MAY2014'd and '30APR2017'd;
Run;

 

My question is:

 

After it runs, in the output table, column 'pi_hat' is a value between 0 and 1. Does it mean it is more likely to be 'Stay' or 'Not Stay'? And how could I apply the result from logistic regression into future 'Arrival_Date'? Thanks! 

 

3 REPLIES 3
Ksharp
Super User

'pi_hat' is Proability for Stay =0.

If you want Stay =1 proability. try

 

Model Stay(event='1') =

Crubal
Quartz | Level 8

Thanks Ksharp, I see. 

 

And how could I apply it into future dates (from '01MAY2017' to '30APR2018') using 'pi_hat'? 

 

Thank you! 

Ksharp
Super User

I don't understand what you mean.

You mean SOCRE a new dataset ?

use SCORE statement.

 

model ........

score data=new_data .....

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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