if you have more variables you want to reshape (X_ Y_ Z_) then those
you don't want to reshape (id time), then you can specify:
ds id time, not
Now a list of all variables would be saved in `r(varlist)', then you can write:
reshape long `r(varlist)' , i(id) j(time)
On 5/12/06, Hans J. Baumgartner <hbaumgartner@diw.de> wrote:

Dear statalist,
I would like to reshape quite a huge number of variables. Is it possible
to use the reshape command without specifying each single variable? Or can
I circumnavigate this problem creating a local that contains all variables
in the data set so that I can implement the local in the reshape command?
What I am having looks something like this:
Varnames : X_1 Y_1 Z_1 X_2 Y_2 Z_2
reshape long X_ Y_ Z_ , i(id) j(time)
How can I use the command without specifying X_ Y_ Z_ ?
Thanks for any suggestions.
Hans
++++++++++++++++++++++++++++++++
Hans J. Baumgartner
Dept. Public Economics
DIW Berlin
German Institut for Economic Research
phone: +49/30/89789-307
fax : +49/30/89789-114
URL: www.diw.de
www.hansbaumgartner.de
++++++++++++++++++++++++++++++++
*
* 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/

--
Ada Ma
Research Fellow
Health Economics Research Unit
University of Aberdeen, UK.
http://www.abdn.ac.uk/heru/
Tel: +44 (0) 1224 553863
Fax: +44 (0) 1224 550926
*
* 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/