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: Thread-Index: Ac6gCEcXwi5L5glZSNei/hI5vS1E9g==
From
Nickolas Lyell <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Thread-Index: Ac6gCEcXwi5L5glZSNei/hI5vS1E9g==
Date
Fri, 23 Aug 2013 09:54:25 -0400
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/