Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to identify patterns of cyclicality using STATA?


From   Natasha Xingyuan Che <[email protected]>
To   [email protected]
Subject   st: How to identify patterns of cyclicality using STATA?
Date   Sun, 6 Nov 2011 15:29:24 -0500

Dear All,

I'm trying to identify business cycle peaks, troughs, and phases of
recession and recovery in a panel data set of countries's quarterly
output series.  I identified peaks and troughs, but am having trouble
marking the periods in between (i.e., recessions and recoveries).  I
would really appreciate it if any of you have suggestions about how to
do this.

The specific definitions of the variables are the following --

A peak occurs at Quarter t of a time series of Y_t if:
(Y_t - Y_t-1) > 0 and (Y_t - Y_t-2) > 0 and (Y_t - Y_t+1) > 0 and (Y_t
- Y_t+2) > 0

A trough occurs at Quarter t if:
(Y_t - Y_t-1) < 0 and (Y_t - Y_t-2) < 0 and (Y_t - Y_t+1) < 0 and (Y_t
- Y_t+2) < 0

A "recession" is a phase from peak to the next trough.  A "recovery"
is a phase from trough to the quarter when Y reaches the level of the
previous peak.

I generated two 0/1 variables, peak and trough, as the following --

tsset country time
gen peak=(lny>l.lny&lny>l2.lny&lny>f.lny&lny>f2.lny)
gen trough=(lny<l.lny&lny<l2.lny&lny<f.lny&lny<f2.lny)

Now I want to generate two variables marking the quarters when the
economy is in recession and in recovery and calculate the respective
duration of the two.  But I'm not sure how to proceed.  Again, all
your inputs are very much appreciated.  Thank you so much for your
help!

Best,
Natasha
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index