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!
Related Posts with How to generate a variable with only one gender?
Stata data manipulation filtering, summing and removing duplicates from quarterly observation dataHello dear Statalist, I am quite new with Stata and I could really need help for my thesis. I have…
Collapsing milliseconds data in secondsHi, i have a question in collapsing data. In the data sample below the header is the timestamp in mi…
Creating a prioritised ethnicity group variableHi all I have hospital admissions data, organised so each observation is an admission. There is a v…
Local projections impulse responde by country groupIn the following example by Oscar Jorda, I want to add impulse responses by different groups of coun…
Growth rates from Panel dataset.Hi Statalist, I have a panel dataset (monthly survey responses) which is defined by a firm id varia…
Subscribe to:
Post Comments (Atom)
0 Response to How to generate a variable with only one gender?
Post a Comment