I have data that looks like the following:
I would like to group by visit_date within id. So that all visits within id 25 that are 21091 are grouped as 1, and all those that are 21104 are grouped as 2 and so on. Thank you so much for your time and help!
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double id float visit_date 25 21091 25 21091 25 21091 25 21091 25 21091 25 21091 25 21104 25 21104 25 21104 25 21122 25 21122 25 21122 25 21235 25 21325 25 21325 25 21325 25 21355 25 21355 25 21355 25 21388 25 21629 25 21629 25 21629 25 21839 25 21839 25 21875 25 21875 25 21941 25 21941 25 21941 end format %td visit_date
Comment