Hello,
I have a variable which shows whether the respondent works in a male dominated or a female dominated work sector. Now i want to generate two new variables, one which shows only the male respondents and whether they work in a male or female dominated sector and one which shows only the female respondents and whether they work in a male or female dominated sector.
How can i do that?
i have tried several code, like the following but none seem to work.
Gen women_in_sector
replace women_in_sector = 0 if sector_recode - (sex >1)
Please help!
0 Response to How to generate a variable with only one gender?
Post a Comment