Hello all,
This is the first time I post a question on this very helpful forum, so thanks in advance!
I have a set of variables with procedures (from 1-10 mentioned as PR1, PR2, PR3...etc) and other variables with the day/timing of those procedures (from 1-10 mentioned as PR1-time, PR2-time, PR3-time...etc.). Each number in the procedure fields corresponds to the number in the day/time variable field.
This stands true for each observation (each observation has x10 procedure variables and x10 procedure timing variables).
If I want to create a new variable that identifies those who had procedure "X" (that can be in the variable field of PR3 in observation #1 while at PR7 in observation #8) that was done at day "Y" (that corresponds specifically with that observation's "X" procedure field, ie. PR3-time for observation #1 but PR7-time for observation #8...etc), what would be the code.
Of note, the procedure variable is a string variable, procedure timing is a continuous variable
This is the first time I post a question on this very helpful forum, so thanks in advance!
I have a set of variables with procedures (from 1-10 mentioned as PR1, PR2, PR3...etc) and other variables with the day/timing of those procedures (from 1-10 mentioned as PR1-time, PR2-time, PR3-time...etc.). Each number in the procedure fields corresponds to the number in the day/time variable field.
This stands true for each observation (each observation has x10 procedure variables and x10 procedure timing variables).
If I want to create a new variable that identifies those who had procedure "X" (that can be in the variable field of PR3 in observation #1 while at PR7 in observation #8) that was done at day "Y" (that corresponds specifically with that observation's "X" procedure field, ie. PR3-time for observation #1 but PR7-time for observation #8...etc), what would be the code.
Of note, the procedure variable is a string variable, procedure timing is a continuous variable
Comment