I have an occupation variable that has 25 categories such as professionals, sales, farmers, self-employed, etc. Although written with alphabet these are numeric. I want to drop data of some of the categories such as self-employed or House-maids, household worker. So I used the code (suppose var name c104)
drop if c104 == Self-employed
but showing
Self not found
r(111);
I also tried to recode
recode c104 (Managers Clarkes Farmers = 2 prof), gen(jobs) label(job status)
It also did not work. Any suggestions. I use STATA 13
Related Posts with Drop alphabetical category of a variable or recode as numeric
Robustness check for cross-sectional data by merging datasets and creating year dummy variableI am currently working on the effects of maternal education on child mortality with cross-sectional …
about time period groupHellow everyone,I wanna to divide stock monthly return into three groups based on the original retur…
SummationI am new to STATA, and I am trying to run a regression with a summation in it so that it creates mul…
Sort in ascending order in twowayHi I have a seemingly easy question. I am examining the rate of a disease by hospital areas. I want…
Adding x axis label to graphHi -I am using the margins command to interpret a three-way interaction. However, the graph seems to…
Subscribe to:
Post Comments (Atom)
0 Response to Drop alphabetical category of a variable or recode as numeric
Post a Comment