Hello,
I have a proc freq program list below. I would like to create a macro list for the LabIDs, the percentage of which is over 5%. Is there a way to do so? Thanks.
proc freq data=sample;
table LabIDs*test_order_codes*test_result_codes / list missing;
run;
I strongly suggest providing an example data set and then show us which of the percentages that will appear in Lab_id that you are asking about.
Here is an example of creating a data set with the output percentages that you should be able to run to see what I mean:
proc freq data=sashelp.cars ; table origin*make*type/out=work.percent outpct ; run;
Then it may be time to discuss how you intend to use that list of variables. it may be better to generate a data set(hint: likely needed for the macro approach) and use the values in the data set.
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.