Hello,
I have a dataset with three variables/timepoints (as below). I need to create a composite variable, Midlife Music Play (midmusic), based on the following:
Midlife Music Play:
---Continuous Play (value==1) is instrument engagement at all follow-up time points;
---Intermittent Play (value==2) is play at one point or another, A or B or C (but not continuously); and
---Never Play (value==3) is no play at any of the three timepoints
---Unknown (value==.)
Note: I cannot use dataex because my data is stored on a confidential server; there is genetic data attached to my analysis.
Variable A (2003): During the past year, how many hours per month did you play a musical instrument?
. = missing
-3 = refused
-1 = don't know
0-200
Variable B (1994): How often did you play a musical instrument about 10 years ago?
. = missing
-3 = refused
1 = Often
2 = Rarely
3 = Never
Variable C (1974): How often did you play a musical instrument when you were about 35?
. = missing
-3 = refused
1 = Often
2 = Rarely
3 = Never
I'm struggling with the most efficient way to get arrive at what I need. I was able to brute force it, but I'd like to understand a more elegant approach.
Thank you!
I have a dataset with three variables/timepoints (as below). I need to create a composite variable, Midlife Music Play (midmusic), based on the following:
Midlife Music Play:
---Continuous Play (value==1) is instrument engagement at all follow-up time points;
---Intermittent Play (value==2) is play at one point or another, A or B or C (but not continuously); and
---Never Play (value==3) is no play at any of the three timepoints
---Unknown (value==.)
Note: I cannot use dataex because my data is stored on a confidential server; there is genetic data attached to my analysis.
Variable A (2003): During the past year, how many hours per month did you play a musical instrument?
. = missing
-3 = refused
-1 = don't know
0-200
Variable B (1994): How often did you play a musical instrument about 10 years ago?
. = missing
-3 = refused
1 = Often
2 = Rarely
3 = Never
Variable C (1974): How often did you play a musical instrument when you were about 35?
. = missing
-3 = refused
1 = Often
2 = Rarely
3 = Never
I'm struggling with the most efficient way to get arrive at what I need. I was able to brute force it, but I'd like to understand a more elegant approach.
Thank you!

Comment