Hi,
I have two variables: 1) age of initiating cigarette use with values from 10-23 and 2) age of initiating hookah use with values from 11-19. Also, these variables are not mutually exclusive and so people could have used both products at different ages. For example, a person could have first-tried a cigarette at 10 years and hookah at 13. I want to combine these variables so that I can create a new variable on age of initiating tobacco substances with values that reflect both variables. I therefore, do not want the variables to simply add up the values. I want the variable to show the lowest age of initiation for each age.
ex.
ageofciguse ageofhookahuse
16 15
15 16
10 17
12 22
11 11
14 19
15 16
19 18
16 14
Ideally, I would like to create a new variable
ageoftobaccouse
15
15
10
12
11
14
15
18
14
Next, how can I do this for more than two variables?
0 Response to Merging two continuous variables in the same dataset
Post a Comment