Hello forum,
I want to classify variables based off their responses - 0 to 9 into "A" , "B" and "C".
Especially, i want people with the "0" response that is less than 30% in the "C" category and people with "0" response between "30% -80%" in the "B" category and people with >80% in the C category.
Please how do i go about this.
Any help or idea is appreciated.
proc freq data=two;
table T1 T2 T3 T4; run;
How do you intend to represent the variable classification> Will you produce three datasets (A,B, and C) with qualifying variables in each? Do you just want a report table with each variable listed along with the classification?
Alsol, do any of your original variables ever have missing values? If so, do the 30% and 80% cutpoints include counting the missing values, or not?
Thank you so much.
I hope them to be in 3 different datasets.
I am so confused on how to do that with proc freq.
Are you classifying people/individual records or variables?
proc freq summarizes variables not individuals.
plans what does I want people with 0 response that is less than 30% in the C and people with the 0 response in the 30 to 8 as B.
how does one person have more than one response?
@ChuksManuel wrote:
Hello forum,
I want to classify variables based off their responses - 0 to 9 into "A" , "B" and "C".
Especially, i want people with the "0" response that is less than 30% in the "C" category and people with "0" response between "30% -80%" in the "B" category and people with >80% in the C category.
Please how do i go about this.
Any help or idea is appreciated.
proc freq data=two; table T1 T2 T3 T4; run;
PROC FREQ produces only one data set. You could take the results of PROC FREQ and use them to help create other data sets, however, your stated rules are not clear and definitive enough to create code that winds up which creates these data sets. How can "0" less than 30% be in C, but other "0" between 30 and 80 be in "B"? How do we tell the "0" that are in C apart from "0" that wind up in "B". Explain this in much more detail, give us an example.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.