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

st: quarterly date


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: quarterly date
Date   Mon, 31 Oct 2005 12:35:04 -0500

help functions -> date;

     +-------------+
     | var1   var2 |
     |-------------|
  1. | 1991      1 |
  2. | 1991      2 |
  3. | 1991      3 |
  4. | 1991      4 |
  5. | 1992      1 |
     |-------------|
  6. | 1992      2 |
     +-------------+

. g date=yq(var1,var2)

. tsset date
        time variable:  date, 124 to 129

. format date %tq

. l

     +----------------------+
     | var1   var2     date |
     |----------------------|
  1. | 1991      1   1991q1 |
  2. | 1991      2   1991q2 |
  3. | 1991      3   1991q3 |
  4. | 1991      4   1991q4 |
  5. | 1992      1   1992q1 |
     |----------------------|
  6. | 1992      2   1992q2 |
     +----------------------+


Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html


*
*   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