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: Creating a time lag dummy
From
TA Stat <[email protected]>
To
[email protected]
Subject
Re: st: Creating a time lag dummy
Date
Wed, 11 May 2011 05:57:27 +0700
I will assume your data in a long format. Creat a new variable
represents IPO year. That means one company will have many rows, but
has the same value of IPO variable. Subtract year (2000 to 2010) from
IPO year. Difference less than 5 should be "1" in a new dummy
variable, others will be "0".
Hope this works.
Peter
On Wed, May 11, 2011 at 12:01 AM, Martijn S <[email protected]> wrote:
> Hello,
>
> I have a problem generating a ‘special’ dummy. This is my problem. I
> have the following columns fyear and year_ipo. Now I want to create a
> dummy which gives a 1 when a company has gone public in the prior 5
> calendar years and a 0 otherwise.
>
> So for example, I have a company which had an IPO in 1999. So this
> dummy should create a 1 for the fiscal year 2000,2001…,2004 and a zero
> for 2005,2006…2010.
>
> Unfortunately I cannot get the dummy working.
>
> I hope that someone can help me solving my problem.
>
> Thanks,
>
> Martijn
>
> *
> * 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/
>
*
* 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/