<>
You have to drop the -label- as well, not just the variable. So say -la drop cntry- in addition to dropping the variable...
HTH
Martin
-------- Original-Nachricht --------
> Datum: Tue, 29 Dec 2009 17:29:40 -0600
> Von: "Mike Kim" <[email protected]>
> An: [email protected]
> Betreff: st: Encode generates a wrong list
> 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/
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
*
* 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/