Dear statalisters,
I have 60 countries in my dataset. "cntrystr" is string variable. To change
it into a numeric variable, I used the following code:
encode cntrystr, gen(cntry)
label list cntry
It lists 60 countries. Then, I dropped 10 countries and wanted to generate a
new label list by the following code:
drop cntry
encode cntrystr, gen(cntry)
However, Stata gives the same 60 countries. This is a problem because I want
to use "forvalues i=1/50 {... }" for my analysis and it is interrupted due
to missing country numbers. How can I remove dropped countries in 'encode"?
Thank you in advance.
Mike.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/