Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Problem with "reshape"


From   "White, Justin" <[email protected]>
To   <[email protected]>
Subject   st: RE: Problem with "reshape"
Date   Wed, 4 Oct 2006 11:47:22 -0400

Try the 'stack' command



Justin White

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Riano,
Juanita
Sent: Wednesday, October 04, 2006 11:43 AM
To: [email protected]
Subject: st: Problem with "reshape"

Dear all, 

I have a wide dataset organized as follows

date  code1_varx     code1_vary   code2_varx  code2_vary
1990        10            20           10          30
1991        10            20           10          30
...

Where:  code1- code300 identify individuals and varx vary are the
varnames (I have 9 variables). 

What I want is a long dataset that looks like this

date   code   varx   vary
1990    1       10      20
1991    1       10      20
..
1990    2       10      30
1991    2       10      30
..

Using the reshape command hasn't worked for me so far because the stub
that identifies the name of the variable is at the end of it: 
no xij variables found r(111);

I also tried to transpose the data using the "xpose" command to
manipulate the names but when you use "xpose" twice the string variables
are dropped,,,

I would really appreciate any suggestion on how to proceed,,,

Thank you very much, 

Juanita Riano


   

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


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