Hi
I'm trying to create a new variable that combines the frequency of binary outputs of different variables.
So basically I have 12 variables of chronic diseases, each containing binary reponses of the participants e.g. 1=yes 2=no ('yes' means having the disease, 'no' means not having the disease)
I want to generate a new variable- 'number of chronic disease' into 3 categories: 0, 1, and ≥ 2 by the number of these 12 individual variables that have values of '1'
For example, let's say the binary variables are: 'hypertension', 'diabetes', 'heart disease', 'asthma', 'cancer', 'depression', and 'stroke'.
Each of them has dichotomous outputs: 1 = 'diagnosed', 2 = 'not diagnosed'
Then, I need the number of diseases present in each participant and make it into three categories- 'none', 'one', and 'more than 2' (i.e. 0,1,2+)
I have no idea how to create a new variable according the outcome frequency of different variables. Would appreciate if someone could help me out with this method.
Thanks
I'm trying to create a new variable that combines the frequency of binary outputs of different variables.
So basically I have 12 variables of chronic diseases, each containing binary reponses of the participants e.g. 1=yes 2=no ('yes' means having the disease, 'no' means not having the disease)
I want to generate a new variable- 'number of chronic disease' into 3 categories: 0, 1, and ≥ 2 by the number of these 12 individual variables that have values of '1'
For example, let's say the binary variables are: 'hypertension', 'diabetes', 'heart disease', 'asthma', 'cancer', 'depression', and 'stroke'.
Each of them has dichotomous outputs: 1 = 'diagnosed', 2 = 'not diagnosed'
Then, I need the number of diseases present in each participant and make it into three categories- 'none', 'one', and 'more than 2' (i.e. 0,1,2+)
I have no idea how to create a new variable according the outcome frequency of different variables. Would appreciate if someone could help me out with this method.
Thanks
Comment