Hello. Can anyone help with the following?
I would like to create one report table for multiple datasets:
proc stdrate data=&MULTIPLEDATA (here I would like to loop through multuple dataset, for example data 1 and data 2)
refdata=&REFDATA(This should unique for each dataset, for example data 1 this refdata=female and for data 2 this refdata=male)
method=direct
stat=rate (mult=100000);
population event=&EVENTS(this also unique for each data as& refdata) total=&population (this also unque for each data as refdata);
reference total=&REF_DATA(also unique for each data);
strata agegroup;
by &VRBL(also unique for each data) notsorted;
ods output StdRate=StdRate;
run;
How can I do that (each data would contain their unique variable and REFDATA also unique data for a given REFDATA.
Thank you.
Couldn't you add
proc append base=RESULT data=STDRATE; run;
after your the step shown?
So you want to write a loop.
How do we know what the values in &MULTIPLEDATA are that we need to loop through? How do we know the values of &EVENTS are? And so on.
Whwere is this information stored?
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!
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.