Hello,
I have a dataset that's set up as panel data with multiple responses for each participant. I have a date variable that has many duplicates within each participant. I want to create a variable that indexes the observations by date for each participant, but I want each duplicate date to have the same _n. So for example, if the first two dates are the same, they'd both be _n = 1 and then the next date would be _n = 2 and so on. Does anyone know how to do this? I can't find an answer anywhere.
I have a dataset that's set up as panel data with multiple responses for each participant. I have a date variable that has many duplicates within each participant. I want to create a variable that indexes the observations by date for each participant, but I want each duplicate date to have the same _n. So for example, if the first two dates are the same, they'd both be _n = 1 and then the next date would be _n = 2 and so on. Does anyone know how to do this? I can't find an answer anywhere.
Comment