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, is already up and running.

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

st: From: Qunzi Zhang <>

Subject   st: From: Qunzi Zhang <>
Date   Thu, 1 Nov 2012 16:06:06 +0100

Dear All

May I ask you a question about construction the data set?

Currently I have the following panel data format
permno    date    prc
27174    19700102    56.375
20386    19700102    34
12052    19700102    28.75
27174    19700101    56.375
20386    19700101    34
12052    19700101    28.75

in Stata, how can I reshape the data and get the format as below: a
big matrix the row is the date, column is the firm identity permno and
input is the stock price?

date          firm 1 firm2 firm3 .....(permno as identifer index for firm)
19700101   56.37 5.37 6.35
19700102  .7  .37 .35

I think merge could be the correct command but using it might create a
lot of dta wrt each firm.... Can you please suggest me an efficient
way to do this?
Thanks a lot in advance
*   For searches and help try:

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