Hi I am trying to generate a variable which satisfies these assumptions if mod_to_vigorous_activity >=1 | vigorous_activity >=1 on at least 3 or more days per recording
Measurement day = is the day of recording measured 1-8
right now i GOT up to here :
I'm stuck trying to incorporate the measurement day.......
Can anyone help?
Many thanks
Measurement day = is the day of recording measured 1-8
right now i GOT up to here :
Code:
bys id: egen who65= 1 if mod_to_vigorous_activity>=1 | vigorous_activity
Can anyone help?
Many thanks
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long id byte measurementday float(mod_to_vigorous_activity vigorous_activity) 10 1 . . 10 2 30.833 3 10 3 16.833 1.917 10 4 25.083 1.833 10 5 28.417 3.083 10 6 20.75 2.5 10 7 18 2.75 10 8 . . 1032 1 . . 1032 2 22.917 1.083 1032 3 30 .833 1032 4 16.917 .333 1032 5 19.333 .333 1032 6 21.25 .583 1032 7 27.667 .167 1032 8 . . 1055 1 67.167 2.5 1055 2 64.667 5.25 1055 3 75.083 5.833 1055 4 71.083 4.083 end
Comment