I have longitudinal data. Each participant has multiple data entries for each visit. Unfortunately, the data does not have unique visit numbers for each participant. For eg. Id 1 will have visit numbers 111,484,222,222, 456 And ID 2 will have to visit no’s 890, 098, 098, 450. I would like to write a code that can assign e.g., Id 1 visits as 111=1 ,484=2,222=3,222=3, 456=4 And I’d 2 will have visits as 890=1, 098=2, 098=2, 450=3. This will provide consistency for all study participants for further analysis. Any guidance will be appreciated. Thank you.
... View more