Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Transpose?


From   "Clive Nicholas" <Clive.Nicholas@newcastle.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Transpose?
Date   Tue, 13 Apr 2004 22:33:18 +0100 (BST)

Justin,

> I have data that looks like this:
>
> yr          series           country1       country2      country3
> 1960      exports           (value)        (value)         (value)
> 1960      imports           (value)         (value)         (value)
> 1961      exports            "     "           " "               "    "
> 1961
>
> etc...
>
> I would like to get the data so it looks like:
>
> yr     country   series(exports)    series(imports)
> 1960   1             (value)            (value)
> 1961   1              ""                      ""
> 1960   2             ""                        ""
> 1961  2                ""                      ""

-reshape long country, i(series) j(year)- ?

The fact that you have _two_ lots of "series" variables might complicate
matters; other, more experienced, Statalisters may well disagree and offer
a solution for this.

CLIVE NICHOLAS        |t: 0(044)191 222 5969
Politics              |e: clive.nicholas@ncl.ac.uk
Newcastle University  |http://www.ncl.ac.uk/geps
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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