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]

Re: st: creating a panel id variable from strings and decimals


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: creating a panel id variable from strings and decimals
Date   Wed, 2 Jan 2013 14:40:35 +0000

This is an FAQ. See

FAQ     . . . . . . . . . . . . . . . . . . . . . . Creating group identifiers
        . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox and W. Gould
        3/01    How do I create individual identifiers numbered
                from 1 upwards?
http://www.stata.com/support/faqs/data-management/creating-group-identifiers/

The Statalist FAQ draws attention to the scope for using -search- to find FAQs.

Nick

On Wed, Jan 2, 2013 at 2:29 PM, Bülent Köksal <[email protected]> wrote:

> 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

*
*   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