Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Reshaping to long format


From   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Reshaping to long format
Date   Tue, 18 Jun 2013 14:24:04 -0400

AGAOGLU Enes <s1236623@sms.ed.ac.uk> :

clear
input firma   firmb   firmc  str9 date
.45     .57     .77     01dec1999
.6      1.09    1.64    01jan2000
.69     .95     1.61    01feb2000
.68     .87     1.83    01mar2000
.55     .72     1.58    01apr2000
end
g i=_n
reshape long firm, j(fid) i(i) str
list


On Tue, Jun 18, 2013 at 2:18 PM, AGAOGLU Enes <s1236623@sms.ed.ac.uk> wrote:
> Dear Colleagues,
>
> I would like to reshape my price data to long format, but my data is not wide formatted as well. What should I do before I use reshape command?
>
> Snapshot from my dataset:
>
> firma   firmb   firmc   date
> .45     .57     .77     01dec1999
> .6      1.09    1.64    01jan2000
> .69     .95     1.61    01feb2000
> .68     .87     1.83    01mar2000
> .55     .72     1.58    01apr2000
>
> Any help is appreciated.
>
> Yours sincerely,
>
> Enes Agaoglu
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index