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?
Descriptive Statistics and Correlation Matrix - Panel DataHi all, For my thesis, I want to show a correlation between my dependent and independent variable, …
Help with Time trends and collinearity in a panel data setDear Statalister, I have a panel data set (xtset msa year) for 291 MSAs over eight years. I have ru…
Implementing a mixture model of Gaussians in StataDear Statalisters, for my thesis I need to compare and evaluate statistical models provided by the …
Marginal probability change induced by a one-standard deviation change in the independent variables (probit)Hello everyone, I would like to run a probit regression in which target indicates whether a firm is…
Stacked chartsHi, I am trying to represent my data in a stacked chart. I have data on export and import. What I am…
Subscribe to:
Post Comments (Atom)
0 Response to How to generate a variable with only one gender?
Post a Comment