Hi, I ran into some problem again.
Please find attached a snap shot (.png format) of data editor view of Stata (13 SE version) after running the codes on the example data. It contains details on individual 011-2, 042-2 and 050-2.Their ages are 57, 62 and 69 respectively (as shown by the age variable). However, their duration of tobacco calculated are, 59, 102 and 76 respectively. The code is disregarding the overlap in ages where the individual indulged in a particular type of tobacco smoked and is adding them all up separately. For example, 011-2 has duration 4, 19, 2, 15 and 19 calculated against it for each episode and type of tobacco. And the code for duration adds up all these to get tota_years=59 years. However, the first episode of cigar smoking from 17 to 35 years over laps with first episode of pipe 29-30, 2nd episode of cigarette smoking (17-31) and 3rd episode of cigarette smoking (32-50). In effect this person smoked any form of tobacco from 13 to 50 yrs of age. So the duration must be 50-13+1. This will also affect the intensity calculated. How can we fix this or am I missing something?
Please find attached a snap shot (.png format) of data editor view of Stata (13 SE version) after running the codes on the example data. It contains details on individual 011-2, 042-2 and 050-2.Their ages are 57, 62 and 69 respectively (as shown by the age variable). However, their duration of tobacco calculated are, 59, 102 and 76 respectively. The code is disregarding the overlap in ages where the individual indulged in a particular type of tobacco smoked and is adding them all up separately. For example, 011-2 has duration 4, 19, 2, 15 and 19 calculated against it for each episode and type of tobacco. And the code for duration adds up all these to get tota_years=59 years. However, the first episode of cigar smoking from 17 to 35 years over laps with first episode of pipe 29-30, 2nd episode of cigarette smoking (17-31) and 3rd episode of cigarette smoking (32-50). In effect this person smoked any form of tobacco from 13 to 50 yrs of age. So the duration must be 50-13+1. This will also affect the intensity calculated. How can we fix this or am I missing something?
Comment