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]

-reshape- question [was: Re: st: Thread-Index: <random garbage>]


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   -reshape- question [was: Re: st: Thread-Index: <random garbage>]
Date   Fri, 23 Aug 2013 15:10:53 +0100

Numeric digits 0...9 are fine in variable names so long as they are
not offered as first character. Just specify a stub you like in -j()-.

Nick
[email protected]


On 23 August 2013 14:54, Nickolas Lyell <[email protected]> wrote:
> I seem to remember a warning against using numbers for variable names in the reshape command, but I wanted to make sure.
>
> I have a list of county GDP by industry with Industry by county long and GDP by year wide.  I would like to invert this so that I have years by county long and GDP by industry wide.  I know that I cannot use variable names that are more than one word long when transforming to wide, so I would like to turn the “description” variable into it’s industry NAICS code.  IE: “GDP: Educational Services” → 611 .
>
> My data is formatted like this:
>
> County description         1990       1991       1992       …
> 1              611                         512.2     436.7     347.9     …
> 1              612                         63.4        67.8        83.4        …
>
>
> Can I use the 3-digit NAICS codes to reshape my data into wide with numbers as NAICS (year-NIACS) so that I can then reshape it long (so it can be a time series)?
>
>
> Nicholas Lyell
> Research Associate
> National Association of Counties | NACo
> [email protected] | 202.661.8820
>
>
> *
> *   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/

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