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: reshaping + info from label


From   Abhimanyu Arora <[email protected]>
To   [email protected]
Subject   st: reshaping + info from label
Date   Tue, 25 Oct 2011 01:11:18 +0200

Dear statalist
Hope all's fine.
I am trying to reshape data that has the following form---

date variable1ab   variable2cd
1      q                         w
2      e                         r



Assume the variable variable1ab is labelled A B, while variable2cd is
labelled C D (actually strings, though)


Finally I would like the data to be of the following form

date var1 var2 value
1      A    B      q
2      A    B      e
1      C    D      w
2      C    D      r


I feel the solution might lie in the commands -ds- or Nick Cox's
-findname- together with -reshape- but I am just unable to see how.
Any ideas?

Best wishes
Abhimanyu
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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