BookmarkSubscribeRSS Feed
supersonic
Calcite | Level 5

i want to write a macro with the mentioned requirement

Input - A sas dataset with dependent binary variable and one predicted probability variable

Output - A dataset with following Stats by Decile - No. of Obs, No. of events, % Obs, % events,

Event Rate, Average Predicted Probability, Lift, Cumulative Lift, Cumulative %events

2 REPLIES 2
supersonic
Calcite | Level 5

the output should looks like

DecileObs#Event#%Obs%EventEvent RateLift

Cumulative

Lift

Average

Predicted

Probability

1
2

please help

ballardw
Super User

You mention that your data only has two variables one binary and the other the predicted probability. Since one of your requirements is for the average predicted probability then what do want a decile of? The binary only has two levels and making a decile from that is going to be a tad rough.

Also, what would be the differece be number of observations and events.

I think you need to describe your starting data a bit more fully.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 779 views
  • 0 likes
  • 2 in conversation