[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Creating panel data?
You need -reshape-. In succession, check
out the on-line help, the manual entry, and
FAQs on -reshape-, bailing out when you
have worked out what to do.
If your year variables were simply
reshape long foo, i(country) j(year)
would do fine.
If you can do it in Excel, whatever that
is, with the equivalent of a one-line
command, then do it that way if you prefer.
Ann Edith Helfman
> I'm fairly new to Stata (I have Stata 9) and would like to
> know whether
> there is a way to rearrange the following:
> WHAT I HAVE: In Data Editor, my first column lists all of the
> under a "country" variable. Each column after that is a
> "year" variable
> ("1984" through "2000") with the appropriate value for each country.
> WHAT I NEED: The data needs to be sorted by country and year.
> In other
> words, I should see first column "country," second column "year," and
> third column those values.
> In other words, I need to create panel data with each country having
> multiple entries by year. I wouldn't mind doing this in
> Excel either, if that works better.
* For searches and help try: