[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Reshape Data
Your -reshape- command is a long way
from being legal, let alone appropriate.
Please tell us about the names
of the variables as you have them at
present in Stata. No variable name in Stata
can begin with a number.
> 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
> some regressions:
> FIRM DATE TURNOVER
> 890216 5/15/1995 0
> 5/16/1995 0
> 5/17/1995 0
> 5/22/1995 .
> 5/23/1995 0
> 691693 5/15/1995 .
> 5/16/1995 0.1
> 5/17/1995 0.2
> 5/22/1995 0.2
> 5/23/1995 0.2
> 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
* For searches and help try: