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
Adding post-estimation results in -esttab- table by adding more columns to e(b) and columns and rows to e(V)Dear Statalist, I want to put -nlcom- results in esttab table and these -nlcom- results are treated…
Dynamic Panel ModelsHi, I try to build model in Stata with xtabond. When I should use option vce(robust)? Or when shoul…
How to create a percentage variableHello, I have a categorical variable for ethnicity. When I tabulate it I can see that there are pe…
Drop (Keep) observationsDear experts, I'm wondering how to drop (or keep) my observations. Below is my dataset. What I want…
5 year Moving AveragesHow can i calculate 5 year moving average of any country's GDP? …
Subscribe to:
Post Comments (Atom)
0 Response to Drop alphabetical category of a variable or recode as numeric
Post a Comment