Please help me out. I am trying to group Age variable say <10, 11-20, 30-40 and 40> and compute the number of occurence that falls within the range but I have been having challenge doing it. I am using the SAS studio
You can do a frequency of AGE using proc freq. But the problem is that it will tabulate individual age values, rather than the age groups of interest to you.
You could create a new variable, AGE_GROUP, calculated from AGE, and then get a frequency table of the new variable. Or I recommend you create a format for AGE, which establishes age groups. And then tell PROC FREQ to do a frequency of AGE using the format you have defined.
Have you set up the proc freq (without grouping) yet? I recommend you show that code, and then we can be more useful in helping you.
You can do a frequency of AGE using proc freq. But the problem is that it will tabulate individual age values, rather than the age groups of interest to you.
You could create a new variable, AGE_GROUP, calculated from AGE, and then get a frequency table of the new variable. Or I recommend you create a format for AGE, which establishes age groups. And then tell PROC FREQ to do a frequency of AGE using the format you have defined.
Have you set up the proc freq (without grouping) yet? I recommend you show that code, and then we can be more useful in helping you.
Thank you for the suggestion. I created AGE_GROUP, calculated from AGE, and then got a frequency table of the new variable.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.