Dear All:
My data is as follows
VarA IDA 4 1 6 2 2 3 1 4 10 5 22 6 2 7 1 8 85 9 I want to create a subgroup when VARA = 1 and VarA = 2, name the subgroup as Rank = 0 and then find find the deciles for the remaining values.
Thanks
Ramdy
I want to create a subgroup when VARA = 1 and VarA = 2, name the subgroup as Rank = 0 and then find find the deciles for the remaining values.
I'm really struggling to decipher this into something I could program. When you talk about "the remaining values", are these the values that are not in RANK=0? Or are they the values of VARA=1 and VARA=2? Why the name RANK=0, this seems to imply something, but I can't figure it out. Is there also a RANK=1?
Can you show us the desired output from this small example?
Paige -- Here is the intuition. I have a column with a series of values. I want to group them into deciles, but not include values of 1 or 2 into the decile grouping, keeping them as a separate group.
so if the values of VarA are
VARA Rank_A
1 -1
3 1
6 2
8 3
9 4
14 5
2 -1
66 6
VARA = 1 OR VARA =2 always get a rank of say ( -1 or 0 -- it does not matter) and the ranks are determined on the remaining values. I hope that I am clearer -- I apologize for any confusion.
Randy
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.