Statalist


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

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


From   Richard Ochmann <[email protected]>
To   [email protected]
Subject   Re: st: "revise" variables in varlist after --reshape--
Date   Wed, 18 Mar 2009 17:36:13 +0100

you could take your "original wide data set", do
----------
. reshape long var4-var5, i(id) j(year)
----------
and -merge- the resulting data set to your current long-format data set 
containing var1-var3.

best, rich



Mandy fu <[email protected]> 
Gesendet von: [email protected]
18.03.2009 17:17
Bitte antworten an
[email protected]


An
[email protected]
Kopie

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






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/


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index