Hi Everyone,
I'm struggling with something that seems rather simple...so simple I can't figure it out.
I have multiple cases (rows) of data for individuals and want to number them so that every case's first instance in the database has a value of 1, every second occurrence, a 2, etc. So I need to lookup the cases by their ID numbers and then lookup the date of each row of data, and on the basis of those two create a new variable that codes the first instance 1, second 2, etc.
Any tips would be greatly appreciated!
I'm struggling with something that seems rather simple...so simple I can't figure it out.
I have multiple cases (rows) of data for individuals and want to number them so that every case's first instance in the database has a value of 1, every second occurrence, a 2, etc. So I need to lookup the cases by their ID numbers and then lookup the date of each row of data, and on the basis of those two create a new variable that codes the first instance 1, second 2, etc.
Any tips would be greatly appreciated!