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
Unit root test for panel dataHi, I am trying to do unit root test for panel data, every time it brings errors saying sample may n…
two-sided logit model (tslogit) in StataDear Stata users, Firstly, let me briefly introduce two-sided logit (TSL) model. In 1996 John Allen…
Unit root test error in panel dataHi, I am trying to do unit root test for panel data, every time it brings errors saying sample may n…
replacing values during importDear All, given a dataset in tab-delimited format, is there any way to tell the insheet/import deli…
Testing whether difference between interacted coefficients is not larger than thresholdDear all, this is probably quite a simple issue for people that are familiar with the test command …
Subscribe to:
Post Comments (Atom)
0 Response to Drop alphabetical category of a variable or recode as numeric
Post a Comment