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

st: controlling the time series operator in panel data


From   <[email protected]>
To   <[email protected]>
Subject   st: controlling the time series operator in panel data
Date   Fri, 27 Sep 2002 10:08:22 -0300 (BRT)

Hi Stata users,

Please, I need help to change the dataset below format. Note that the
reshape command is not enough to do this transformation.

            Id          period      others variables
  1.         1          1996
  2.         1          1996
  3.         1          1996
  4.         1          1997
  5.         1          1997
  6.         1          1997
  7.         1          1998
  8.         1          1998
  8.         1          1999
  9.         1          1999
 10.         1          2000
 11.         1          2000
 12          1          2000
 13          1          2001
 14          1          2001
 15          2          1996
 16.         2          1996
 17.         2          1996
 18.         2          1997
 19          2          1997
 20          2          1997
 21          2          1998
 22          2          1998
 23          .          1999
 24          .          1999
 25          2          2000
 26          2          2000
 27          2          2000
 28          2          2001
 29          2          2001
 30          3          1996
 31          3          1996
 32          3          1996
 33          3          1997
 34          3          1997
 35          3          1997
 36          3          1998
 37          3          1998
 38          3          1999
 39          3          1999
 40          3          2000
 41          3          2000
 42          3          2000
 43          .          2001
 44          .          2001
 45          4          1996
 46          4          1996
 47          4          1996
 48          4          1997
 49          4          1997
 50          4          1997
 51          4          1998
 52          4          1998
 53          4          1999
 54          4          1999
 55          4          2000
 56          4          2000
 57          4          2000
 58          4          2001
 59          4          2001


***************************************************************
 ***** I need the data in this format (with the year controlling the time
series operator) ********************

            id         period      others variables
  1.         1          1996
  2.         1          1997
  3.         1          1998
  4.         1          1999
  5.         1          2000
  6.         1          2001
  7.         1          1996
  8.         1          1997
  9.         1          1998
 10.         1          1999
 11.         1          2000
 12.         1          2001
 13.         1          1996
 14.         1          1997
 18          .          1998
 19          .          1999
 20          1          2000
 21          .          2001
 22          2          1996
 23          2          1997
 24          2          1998
 25          .          1999
 26          2          2000
 27          2          2001
 29          2          1996
 30          2          1997
 31          2          1998
 32          .          1999
 33          2          2000
 34          2          2001
 35          2          1996
 36          2          1997
 37          2          1998
 38          .          1999
 39          2          2000
 40          2          2001
 41          3          1996
 42          3          1997
 43          3          1998
 44          3          1999
 45          3          2000
 46          .          2001
 47          3          1996
 48          3          1997
 49          3          1998
 50          3          1999
 51          3          2000
 52          .          2001
 53          3          1996
 54          3          1997
 55          3          1998
 56          3          1999
 57          3          2000
 58          .          2001
 59          4          1996
 60          4          1997
 61          4          1998
 62          4          1999
 63          4          2000
 64          4          2001
 65          4          1996
 66          4          1997
 67          4          1998
 68          4          1999
 69          4          2000
 70          4          2001
 71          4          1996
 72          4          1997
 73          .          1998
 74          .          1999
 75          4          2000
 76          .          2001


 Any help would be appreciated.

Thanks

Paulo Loureiro
Universidade Cat�lica de Bras�lia




*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index