[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Reshape Data
I have an unusual dataset that I am trying to reshape, and the ususal
commands don't seem to apply.
An example of the data is as follows:
Code 890216(VO) 691693(VO)
5/15/1995 0 .
5/16/1995 0 0.1
5/17/1995 0 0.2
5/22/1995 . 0.2
5/23/1995 0 0.2
I would like to obtain a standard panel (long format) so that I can run
FIRM DATE TURNOVER
890216 5/15/1995 0
691693 5/15/1995 .
The only unique identifier is the firm number (890216(VO)), and the
stem of the common text is the suffix rather than the prefix (e.g.
inc_90 inc_91 inc_92).
I am currently trying something like:
. reshape datafile 890216, i(code) j(turnover) string
But since the prefix is a unique number, I can't replace the unique
number thousands of times.
I would greatly appreciate any suggestions on how to reformat the
Thank you and regards,
* For searches and help try: