Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: A tricky reshape


From   Andreas Kuhn <[email protected]>
To   [email protected]
Subject   Re: st: A tricky reshape
Date   Fri, 25 Jun 2004 13:37:58 +0200

Hawken, Angela wrote:
I'm struggling to reshape a dataset.  I need to go from wide to long.  The
format is:

State JanX1 JanX2...JanX7...DecX6 DecX7
State is a unique identifier.

I need it in the form:
State Month X1...X7

This seemed simple when I started but the stock commands don't seem to work.


I'd appreciate any help.

Thanks,
Angela

----------------------------------------------------------
IMPORTANT WARNING:  This email (and any attachments) is only intended for the use of the person or entity to which it is addressed, and may contain information that is privileged and confidential.  You, the recipient, are obligated to maintain it in a safe, secure and confidential manner.  Unauthorized redisclosure or failure to maintain confidentiality may subject you to federal and state penalties. If you are not the intended recipient, please immediately notify us by telephone or return email, and delete this message from your computer.
----------------------------------------------------------
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

Dear Angela,

using the - reshape - command in the following way should work:

. reshape long @X1 @X2 ... @X7, i(state) j(month) string

Best regards, Andreas

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index