I have a very complicated question about calculating a weighted index for each firm (2,000+) and each year (over the 1999-2015 period). Thus, I try to split the question into a few pieces so that it is easier for me to describe my question and for you to provide answer.
Basically, I'd like to calculate the weighted time (proportion) of Directors appointed after the CEO assumed office for each firm and every year.
Take firm 1 in year 2000 as an example, D1 became a director before the CEO assumed office, while D2 and D3 were after CEO. In this simple case, the index is equal to (1+1)/3 (two out of three directors were later than the CEO entered the office). How can I use Stata to do this?
But things get more complicated because directors may change over time.
Take firm 2 for another instance, director T1 steps down on 1/31/2010 and T4 becomes director thereafter (from 2/1/2010). In this case, the index is calculated as (1 (T2)+1 (T3) + 11/12 (T2))/3. How can I use Stata to do this?
Basically, I'd like to calculate the weighted time (proportion) of Directors appointed after the CEO assumed office for each firm and every year.
HTML Code:
list, sep(0) +-----------------------------------------------------------------------------+ | firm year Director D_start D_end CEO C_start C_end | |-----------------------------------------------------------------------------| 1. | 1 2010 D1 7/1/2008 8/31/2011 C1 1/1/2009 12/31/2012 | 2. | 1 2010 D2 6/1/2009 5/31/2012 C1 1/1/2009 12/31/2012 | 3. | 1 2010 D3 8/1/2009 7/31/2012 C1 1/1/2009 12/31/2012 | 4. | 2 2010 T1 7/1/2008 1/31/2010 C2 1/1/2009 12/31/2012 | 5. | 2 2010 T4 2/1/2010 8/31/2011 C2 1/1/2009 12/31/2012 | 6. | 2 2010 T2 6/1/2009 5/31/2012 C2 1/1/2009 12/31/2012 | 7. | 2 2010 T3 8/1/2009 7/31/2012 C2 1/1/2009 12/31/2012 | +-----------------------------------------------------------------------------+
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte firm int year str2 Director int(D_start D_end) str2 CEO int(C_start C_end) 1 2010 "D1" 17714 18870 "C1" 17898 19358 1 2010 "D2" 18049 19144 "C1" 17898 19358 1 2010 "D3" 18110 19205 "C1" 17898 19358 2 2010 "T1" 17714 18293 "C2" 17898 19358 2 2010 "T4" 18294 18870 "C2" 17898 19358 2 2010 "T2" 18049 19144 "C2" 17898 19358 2 2010 "T3" 18110 19205 "C2" 17898 19358 end format %tdnn/dd/CCYY D_start format %tdnn/dd/CCYY D_end format %tdnn/dd/CCYY C_start format %tdnn/dd/CCYY C_end
But things get more complicated because directors may change over time.
Take firm 2 for another instance, director T1 steps down on 1/31/2010 and T4 becomes director thereafter (from 2/1/2010). In this case, the index is calculated as (1 (T2)+1 (T3) + 11/12 (T2))/3. How can I use Stata to do this?
Comment