Hi everyone
Sorry for asking fundamental questions but I am a new user. What will be the syntax if there are multiple conditions of the same category? For example, I want to categorize Education_level 1, 2, and 3 as low_education? How can I do that? I used
gen education_3cat =.
replace education_3cat = 1 if Education_level 1 | Education_level 2 | Education_level 3
I also used "&" but I couldn't do that? Could you please help me to do that?
Sorry for asking fundamental questions but I am a new user. What will be the syntax if there are multiple conditions of the same category? For example, I want to categorize Education_level 1, 2, and 3 as low_education? How can I do that? I used
gen education_3cat =.
replace education_3cat = 1 if Education_level 1 | Education_level 2 | Education_level 3
I also used "&" but I couldn't do that? Could you please help me to do that?
Comment