How do I generate a categorical variable? Taking the following values: 0 if the household lives beneath the $1 a day poverty line; 1 if the household lives beneath the $2 a day poverty line, but above the $1 line; 2 otherwise. There are two variables poor1 (0 and 1) which describes household beneath $1 a day poverty line and poor2 (0 and 1): which describes household beneath $2 a day poverty line.
I did the following: gen income_group = 0 if poor1==1
replace income_group = 1 if poor2==1
replace income_group = 2 if poor2>1
replace income_group = 0 if poor1==1
However, I am not quite sure. What do I do when it says: missing values?
Any help is highly appreciated!
I did the following: gen income_group = 0 if poor1==1
replace income_group = 1 if poor2==1
replace income_group = 2 if poor2>1
replace income_group = 0 if poor1==1
However, I am not quite sure. What do I do when it says: missing values?
Any help is highly appreciated!
Comment