Hello,
I need to create a dummy variable "Interlock" that takes the value of 1 whenever one director (directorid) serves on the board of 2 (or more) firms (companyid) at the same point in time- that being in a "common year".
In the data, I have the starting year (year_service_began) and the ending year (year_service_ends) for when the director served on the firm's board. It is enough that the director served on the board of 2 firms during one common year in the time period (start until end) to be considered "Ïnterlocked". So for a certain director in a certain firm, the time period (i.e. range) of his/her service would be the earliest year he/she started (minimum value in Year_Service_Began) until the last year he/she served (maximum value in Year Service Ends). That director would be considered interlocked if he/she was a director of another firm as well for at least one common year. I also have the variable "myear" which is the year of the data (I have financial variables which differ per firm per year, but I have not included them here for simplicity purposes). For that reason, I cannot aggregate the multiple observations per director and firm into one observation. I need to have one for each year as per the below example from my dataset.
For example (below), directorid #9 was a member of firms: 513271 from 2003 until 2011 and 533240 from 2000 until 2012. The dummy variable "Interlock" should be =1 for each of the following observations as for each one of them, director #9 was serving on 2 firms for at least one common year.
513271 9 2003 2009 2007
513271 9 2003 2009 2008
533240 9 2000 2009 2008
513271 9 2003 2011 2009
533240 9 2000 2011 2009
513271 9 2003 2011 2010
533240 9 2000 2011 2010
533240 9 2000 2012 2011
I kindly need help with the commands to create the dummy variable "Interlock".
P.S.: I am using Stata/SE 16.0
Thank you in advance for your time.
Christelle
I need to create a dummy variable "Interlock" that takes the value of 1 whenever one director (directorid) serves on the board of 2 (or more) firms (companyid) at the same point in time- that being in a "common year".
In the data, I have the starting year (year_service_began) and the ending year (year_service_ends) for when the director served on the firm's board. It is enough that the director served on the board of 2 firms during one common year in the time period (start until end) to be considered "Ïnterlocked". So for a certain director in a certain firm, the time period (i.e. range) of his/her service would be the earliest year he/she started (minimum value in Year_Service_Began) until the last year he/she served (maximum value in Year Service Ends). That director would be considered interlocked if he/she was a director of another firm as well for at least one common year. I also have the variable "myear" which is the year of the data (I have financial variables which differ per firm per year, but I have not included them here for simplicity purposes). For that reason, I cannot aggregate the multiple observations per director and firm into one observation. I need to have one for each year as per the below example from my dataset.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long companyid int(directorid year_service_began year_service_ends myear) 529825 1 1983 2011 2007 529825 1 1983 2010 2008 529825 1 1983 2011 2009 529825 1 1983 2013 2010 529825 1 1983 2013 2011 529825 1 1983 2013 2012 106645 2 1985 2009 2007 106645 2 1985 2011 2008 106645 2 1985 2012 2009 106645 2 1985 2011 2010 522777 3 2000 2009 2007 522777 3 2000 2011 2008 10610 4 1988 2011 2007 10610 4 1988 2010 2008 10610 4 1988 2011 2009 10610 4 1988 2013 2010 10610 4 1988 2013 2011 10610 4 1988 2013 2012 10610 5 1985 2009 2007 10610 5 1985 2011 2008 10610 5 1985 2012 2009 29572 6 2002 2010 2007 29572 6 2002 2009 2008 11757 8 1999 2009 2007 11757 8 1999 2009 2008 513271 9 2003 2009 2007 513271 9 2003 2009 2008 533240 9 2000 2009 2008 513271 9 2003 2011 2009 533240 9 2000 2011 2009 513271 9 2003 2011 2010 533240 9 2000 2011 2010 533240 9 2000 2012 2011 24785 12 1987 2009 2007 29281 12 2003 2009 2007 133543 12 1999 2009 2007 24785 12 1987 2009 2008 133543 12 1999 2009 2008 133543 12 1999 2011 2009 133543 12 1999 2011 2010 133543 12 1999 2012 2011 133543 12 1999 2013 2012 133543 12 1999 2014 2013 133543 12 1999 2015 2014 133543 12 1999 2016 2015 5191 13 2002 2009 2007 24785 13 1971 2009 2007 5191 13 2002 2009 2008 534028 13 2008 2009 2008 5191 13 2002 2011 2009 109672 13 2008 2011 2009 534028 13 2008 2011 2009 5191 13 2002 2011 2010 109672 13 2008 2011 2010 534028 13 2008 2011 2010 5191 13 2002 2012 2011 109672 13 2008 2012 2011 534028 13 2008 2012 2011 5191 13 2002 2013 2012 109672 13 2008 2013 2012 534028 13 2008 2013 2012 5191 13 2002 2014 2013 109672 13 2008 2014 2013 534028 13 2008 2014 2013 5191 13 2002 2015 2014 109672 13 2008 2015 2014 534028 13 2008 2015 2014 5191 13 2002 2016 2015 109672 13 2008 2016 2015 534028 13 2008 2016 2015 5191 13 2002 2017 2016 109672 13 2008 2017 2016 534028 13 2008 2017 2016 5191 13 2002 2018 2017 109672 13 2008 2018 2017 534028 13 2008 2018 2017 534028 13 2008 2019 2018 534028 13 2008 2020 2019 160556 14 2006 2009 2007 515366 14 2004 2009 2007 518512 14 1999 2009 2007 160556 14 2006 2009 2008 515366 14 2004 2009 2008 518512 14 1999 2011 2008 160556 14 2006 2011 2009 515366 14 2004 2011 2009 518512 14 1999 2012 2009 160556 14 2006 2011 2010 515366 14 2004 2011 2010 518512 14 1999 2011 2010 160556 14 2006 2012 2011 515366 14 2004 2012 2011 110983 14 2012 2013 2012 160556 14 2006 2013 2012 515366 14 2004 2013 2012 110983 14 2012 2014 2013 160556 14 2006 2014 2013 515366 14 2004 2014 2013 110983 14 2012 2015 2014 160556 14 2006 2015 2014 end
513271 9 2003 2009 2007
513271 9 2003 2009 2008
533240 9 2000 2009 2008
513271 9 2003 2011 2009
533240 9 2000 2011 2009
513271 9 2003 2011 2010
533240 9 2000 2011 2010
533240 9 2000 2012 2011
I kindly need help with the commands to create the dummy variable "Interlock".
P.S.: I am using Stata/SE 16.0
Thank you in advance for your time.
Christelle

Comment