DATA Step, Macro, Functions and more

sas macro

Reply
Contributor
Posts: 26

sas macro

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

Contributor
Posts: 26

Re: sas macro

the output should looks like

DecileObs#Event#%Obs%EventEvent RateLift

Cumulative

Lift

Average

Predicted

Probability

1
2

please help

Super User
Posts: 10,516

Re: sas macro

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.

Ask a Question
Discussion stats
  • 2 replies
  • 184 views
  • 0 likes
  • 2 in conversation