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]
Re: st: bysort variable measuring continuous increase in panel variable
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: bysort variable measuring continuous increase in panel variable
Date
Wed, 21 Aug 2013 21:27:02 +0100
-tsspell- (SSC) is a general tool here. One of its examples (inspired
by Kit Baum) is about identifying spells of GDP growth.
-search spell, sj- for a downloadable parallel discussion.
Nick
[email protected]
On 21 August 2013 20:51, Nickolas Lyell <[email protected]> wrote:
> Hi,
>
> I'm trying to generate a variable that identifies when a county did not have a recession, by indicating when there was continual economic growth.
>
> In a sense, I want:
>
> bysort fips_num: noRecession = 1 if GDP[2013] > GDP[2012]
>
> continued over a set period of years so it returns 1 only if the growth was continuous over a set period of years (say 2002 - 2013).
> Fips_num is my id for groups of observations, with the panel encompassing the years 1990-2013.
>
> Is a for loop the best way to accomplish this?
>
>
> Thank you much,
> ---
> Nicholas Lyell
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/