Hello, I want to create a variable that identifies if a specific patient receives more than one dosage type of a given medication. So if the patient only receives one dosage type than the new variable would be 1 for all given rows for that patient. If a patient receives two different dosage types than the new variable would be 1 for the first dosage type and 2 for the 2nd dosage type. Below is an example of the data and the variable I want to create. (I'm using SAS 9.2). Thank you in advance! ID Medication_dose Variable_wanted 1 500mg 1 1 500mg 1 1 500mg 1 1 100mg 2 1 100mg 2 2 250mg 1 2 250mg 1 2 250mg 1 3 500mg 1 3 500mg 1 3 250mg 2 3 100mg 3
... View more