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
ML fails to convergeDear Stata experts, I have the following program to generate conditional skewness and kurtosis, whic…
the format of number was transformed to string wrongly when using import excel, how to solve this?The varaiable id is number in excel, after importing to stata, it becomes string variable, how to co…
Calculate difference between two clock timesHi, I have string data on start and end times of an activity in "hhmm" format. I want to find the t…
Counting diseasesHi dear Statalist: I have a question. My dataset has 6764 subjects, from them 4142 have any disease…
Counting diseasesHi dear Statalist: I have a question. My dataset has 6764 subjects, from them 4142 have any disease…
Subscribe to:
Post Comments (Atom)
0 Response to Drop alphabetical category of a variable or recode as numeric
Post a Comment