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?
Reminder: UK Stata Conference submission deadline 26 MayUK Stata Conference, 7-8 September 2023: reminder I'm bumping the thread at https://www.statalist.o…
number increased or decreased?Dear All, I found this question here (in Chinese). The variable x denotes the product. Code: * Exam…
Query on ordering coefficients from multiple models when using coefplotHi All We need help with using the coefplot command. Briefly, we have run a series logistic regress…
How do I find out which excel file was imported into STATA (origin of data?)Hey all, Months ago, I imported an excel file into stata for analysis. However, I would like to do…
Stata Command: including interaction terms of the endogenous variable in 2SLS using xtivregHi, I am wondering if anyone had any experience in including an interaction term in 2SLS using xtiv…
Subscribe to:
Post Comments (Atom)
0 Response to How to generate a variable with only one gender?
Post a Comment