Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: creating a panel id variable from strings and decimals


From   Bülent Köksal <bkoksal@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: creating a panel id variable from strings and decimals
Date   Wed, 2 Jan 2013 16:29:01 +0200

Dear Stata Users,

1. How can I convert city names (strings) to city ids so that I can
use it as a panel id variable?

2. What if there are numerical codes with decimals that correspond to
each city rather than names. How can I achieve the same task above so
that I can create a panel id variable?

In the first case

City
AGB
DFT
EFH
AGB
EFH
...

In the second case

City
4.678
3.456
0.356
4.678
0.356


Thanks in advance for any help.

--
Bülent Köksal

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index