How do I create a categorical variable using a variables percentage?
You can use Proc Freq to generate a variable called PERCENT, merge it back to your original data, and then create a categorical variable using variable PERCENT. proc freq data=ye.class; table age/out=agefreq(keep=age PERCENT); run; proc sort data=ye.class; by age; proc sort data=agefreq; by age; data all; merge ye.