Statalist The Stata Listserver


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

st: RE: reshape


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: reshape
Date   Fri, 12 May 2006 12:02:32 +0100

It is not only possible: it is essential. 
What you supply to -reshape- is a list
of stubs, not a variable list. 

However, at some point you do have to 
specify that list of stubs. 

If your example problem were your real problem, then 
your example solution would be your real solution. 

The further examples at 

FAQ     . . . . . . . . . . . . . . . . . . . . . . . .  Problems with reshape
        12/03   I am having problems with the reshape command. Can
                you give further guidance?
                http://www.stata.com/support/faqs/data/reshape3.html

indicate a few tricks that may be what you want. 

Nick 
[email protected] 

P.S. I wouldn't try to circumnavigate this problem. 
The historical precedents are not attractive. 

(a) You die en route. 

(b) You end up exactly where you started, but about a year later. 

Hans J. Baumgartner
 
> 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_ ?

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