I need some help summarizing a relatively small dataset by the state code that is in the data. I have locations both inside and outside of the U.S. and I'd like to summarize this so that I can see how many records are in the U.S. and how many are in different countries.
I'd like to have something output that shows the state and the frequency, but ONLY if the frequency is over 25.
Then I'd like to have it grouped by in U.S. vs. Outside of U.S. Is there a way to do this without individually calling out every state/territory in a data step?
PROC FREQ with FORMAT. Create a user format that maps each state to US and everything else to a different code. Then when you do the PROC FREQ you can apply that format and have it displayed as desired.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.