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

Re: st: Reshape command


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: Reshape command
Date   Mon, 02 Feb 2004 11:31:22 -0500

At 03:22 PM 2/2/2004 +0000, Roger Newson wrote:
At 15:10 02/02/04 +0000, Tumur Gunchinmaa wrote:
Dear all,
I am new to Stata and started using Stata 6.0.
I am having problems to reshape my data from wide to long form.
 I have many variables.
 Is there any way to reshape it without typing in "j"s.
 Also when I type the command
.reshape long i(id)
Stata asks me to indentify "i". What does this mean?
There should definitely be a comma between the "reshape long" and the "i(id)", as in

reshape long varnames, i(id)

Roger
[...]
I just want to add one bit of advice. Prior to the -reshape-, you should -keep- only the variables you want to come through the -reshape-. (Equivalently, -drop- the ones you don't want.) Keep those you mention in the -reshape- command, plus any others you want retained (which will be spread out as constants within each id-group.) If you neglect to do this, you may end up with many excess variables (each spread out as constants within id-groups), taking up lots of space, and adding significant processing time to the -reshape-. The reshape help does not say much about this.

I hope this is useful.
-- David

David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404

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