Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: "revise" variables in varlist after --reshape--


From   Mandy fu <mandy.fu1@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: "revise" variables in varlist after --reshape--
Date   Wed, 18 Mar 2009 11:17:02 -0500

Hi all,

After reshape the data from wide into long, I find I forgot to include
some variables in the varlist in the --reshape long--command.
The following command is what I used:
----------
. reshape long var1-var3, i(id) j(year)
----------
Then I realized I should include two more variables:
--------
.. reshape long var1-var5, i(id) j(year)
--------
To fix this problem, I know I could go back to the original wide data
set and reshape again from the very beginning adding the variables I
forgot . But if I have done a lot of steps on the reshaped long data
already, this method means I have to redo all  those again.  I wonder
if there' s any better way to "revise" the reshape command in this
situation.

Thanks in advance!
Mandy
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index