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

st: Reshape problem


From   "Thomas Speidel" <[email protected]>
To   [email protected]
Subject   st: Reshape problem
Date   Sat, 08 Oct 2005 10:56:35 -0600

Dear Statalisters:
I have a dataset that looks like this:

year  amount1  amount2  ... amount20
1      2             7                9
2      5             9                2
3      7             1                8
..
26    7             11               9

I need to reshape it into this:

amount  amount_yr1  amount_yr2  ...  amount_yr26
1
2
3
..
20

I am having problems with the reshape command...
I tried:
. reshape long amount, i(year) j(amount*)
but it does not work...

Thanks,
Thomas


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