Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: RE: Reshaping to long format
From 
 
AGAOGLU Enes <[email protected]> 
To 
 
"[email protected]" <[email protected]> 
Subject 
 
st: RE: RE: Reshaping to long format 
Date 
 
Tue, 18 Jun 2013 18:58:38 +0000 
Both of your methods worked, appreciate it.
________________________________________
From: [email protected] [[email protected]] on behalf of Impavido, Gregorio [[email protected]]
Sent: 18 June 2013 19:38
To: [email protected]
Subject: st: RE: Reshaping to long format
What about
reshape long firm, i(date) j(ftype) string
rename firm price
________________________________________
From: [email protected] [[email protected]] on behalf of Austin Nichols [[email protected]]
Sent: 18 June 2013 19:24
To: [email protected]
Subject: Re: st: Reshaping to long format
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
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of AGAOGLU Enes
Sent: Tuesday, June 18, 2013 2:18 PM
To: [email protected]
Subject: st: Reshaping to long format
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
--
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
*
*   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/
*
*   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/
*
*   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/