I neaad to crate a macro
with input a sas dataset with dependent binary variable ano one predicted probabilty variable.
output a dataset with the stats by deciles- no:of obs, no.of events, %obs, % events, event rate, lift, cumulative lift, avg predicted prbablity.
any1 help!!
%macro reg(dsname, DV, PV, selecttype );
proc logistic data=&dsname;
model &DV=&PV
/selection = &selecttype;
output out=&out ;
run;
print data=&out;
run;
%mend reg;
is this correct(atleast half part)
%reg()
Looks like you have done it.
The basic process should be:
%macro reg(dsname, DV, PV, selecttype );
proc logistic data=&dsname;
model &DV=&PV
/selection = &selecttype;
output out=out_&dsname ;
run;
title from dataset out_&dsname;
print data=out_&dsname;
run;
title;
%mend reg;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.