Hello, I am a beginner SAS 9.4 user and I am trying to do a project for a study. In this study, I have two variables "Kids yelled at me" and "kids called me names" that constitute together to become bullying. The question was also answered on a scale of 0 to 4, o being no bullying and 1-4 being bullying so I would like first like to assign new categories in each variable for those ranges and after that merge with the other variable. ID Kids yelled at me Kids called me names 1 0 0 2 3 3 3 1 1 4 4 4 5 2 2 6 1 2 so I would like in each category to keep 0 as no bullying and all the rest as bullying and after that merge both variables to get total bullying. data want; set work.main1; if kids yelled at me=0 then group=No if kids called me names=0 then group=No if kids yelled at me=1 2 3 4 then group=yes; if kids called me names=1 2 3 4 then group=yes; run; proc print data=want; run; This is where I am at, it is probably not correct
... View more