Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ceo transition from male to female

    Dear community,

    I have an unbalanced panel data where I want to create the following variables with some conditions:
    1. Dummy variable for the changes in CEO.
    2. Dummies for Transitions of CEOs from female to male and male to female.
    3. Both pre-and post-transition CEOs are in the data (office) consecutively for at least three years excluding the transition year.
    4. A dummy variable that equals 1 if a firm-year is after a (female to male) CEO transition, and 0 if a firm-year is before a CEO transition.
    Below is provided the example dataset including fyear, ceoid, firm_id, and gender(male=1 female=0)

    Thanks

    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double fyear float firm_id int ceo_id byte gender
    1994 1004 1369 1
    1995 1004 1369 1
    1996 1004 4832 1
    1997 1004 4832 1
    1998 1004 4832 1
    1999 1004 4832 1
    2000 1004 4832 1
    2001 1004 4832 1
    2002 1004 4832 1
    2003 1004 4832 1
    2004 1004 4832 1
    2005 1004 4832 1
    2006 1004 4832 1
    2007 1004 4832 1
    1993 1013 663 1
    1994 1013 663 1
    1995 1013 663 1
    1996 1013 663 1
    1997 1013 663 1
    1998 1013 663 1
    1999 1013 663 1
    2000 1013 663 1
    2001 1013 4242 1
    2002 1013 4242 1
    2004 1013 4900 1
    2005 1013 4900 1
    2006 1013 4900 1
    2007 1013 4900 1
    2008 1013 4900 1
    1994 1034 4612 1
    1995 1034 4612 1
    1996 1034 4612 1
    1997 1034 4612 1
    1998 1034 4612 1
    1999 1034 3551 1
    2000 1034 5325 0
    2001 1034 5325 0
    2002 1034 5325 0
    2003 1034 5325 0
    2004 1034 5325 0
    2005 1034 5325 0
    2006 1034 3433 1
    2007 1034 3433 1
    1993 1045 1012 1
    1994 1045 1012 1
    1995 1045 1012 1
    1996 1045 1012 1
    1997 1045 1012 1
    1998 1045 749 1
    1999 1045 749 1
    2000 1045 749 1
    2001 1045 749 1
    2002 1045 749 1
    2003 1045 145 1
    2004 1045 145 1
    2005 1045 145 1
    2006 1045 145 1
    2007 1045 145 1
    2008 1045 145 1
    1993 1055 4039 1
    1994 1055 4039 1
    1995 1055 4039 1
    1996 1055 1218 1
    1999 1056 407 1
    2000 1056 407 1
    2001 1056 407 1
    2002 1056 407 1
    2003 1056 407 1
    2004 1056 407 1
    2005 1056 407 1
    2006 1056 407 1
    2000 1072 4247 1
    2001 1072 1789 1
    2002 1072 1789 1
    2003 1072 1789 1
    2004 1072 1789 1
    2005 1072 1789 1
    2006 1072 1789 1
    2007 1072 1789 1
    1993 1075 4692 1
    1994 1075 4692 1
    1995 1075 4692 1
    1996 1075 4692 1
    1997 1075 4692 1
    1998 1075 4692 1
    1999 1075 3974 1
    2000 1075 3974 1
    2001 1075 3974 1
    2002 1075 3974 1
    2003 1075 3974 1
    2004 1075 3974 1
    2005 1075 3974 1
    2006 1075 3974 1
    2007 1075 3974 1
    2008 1075 3974 1
    1998 1076 3026 1
    1999 1076 3026 1
    2000 1076 3026 1
    2001 1076 3026 1
    2002 1076 3026 1
    end

  • #2
    There are some problems.

    Look at firm_id 1013: there is no data for 2003. Moreover, it's a critical gap in the data, because depending on who the CEO is in 2003, the answer to your third request would be different. In fact, if the ceo_id in 2003 is other than 4242 or 4900, then even the results for the first two requests would change. How do you want to handle situations like this (i.e. where the data itself has a gap)?

    I don't understand 4). When you say "before" or "after" a transition, do you mean immediately before (or after) or do you mean all observations that precede (or follow) that observation for the duration of that CEO (or perhaps for the entire firm?) Also, the conditions that you give to define the 0 and 1 values for 4 are not exhaustive--so what do you want to do for an observation that meets neither condition?

    Comment


    • #3
      Dear Clyde,
      Thank you for your reply and for highlighting the concerns. I wish to drop firms with such missing data. For statement number 4, I mean all observations that precede (or follow) that observation for the duration of that CEO.
      These are the revised requirements:
      1. Dummy variable for the changes in CEO.
      2. Dummies for Transitions of CEOs from female to male and male to female.
      3. Both pre-and post-transition CEOs are in the data (office) consecutively for at least two years excluding the transition year. (I changed the office duration from three to two years).
      4. if a firm changes its CEOs more than once, then I wish to count the first change and drop the subsequent changes for that firm.
      5. A dummy variable (for instance-Post) that equals 1 if a firm-year is after a (female to male) CEO transition, and 0 if a firm-year is before a CEO transition.
      Thank you in advance


      Comment


      • #4
        Code:
        //  DROP FIRMS WITH GAPS IN THE DATA
        by firm_id (fyear), sort: egen byte to_drop = max(fyear != fyear[1] + _n - 1)
        drop if to_drop
        drop to_drop
        
        //  INDICATOR FOR CHANGE IN CEO
        by firm_id (fyear), sort: gen byte wanted1 = ceo_id != ceo_id[_n-1]
        
        //  ASCERTAIN TENURE OF CEOS
        by firm_id (fyear): gen ceo_spell = sum(wanted1)
        by firm_id ceo_spell (fyear), sort: gen tenure = _N
        
        //  INDICATORS FOR FEMALE TO MALE AND MALE TO FEMALE TRANSITIONS
        by firm_id (ceo_spell fyear): gen byte wanted2_m_to_f = wanted1 ///
            & gender[_n-1] == 1 & gender == 0
        by firm_id (ceo_spell fyear): gen byte wanted2_f_to_m = wanted1 ///
            & gender[_n-1] == 0 & gender == 1
            
        //  INDICATOR FOR TRANSITIONS BETWEEN CEOS WITH AT LEAST TWO YEARS TENURE
        //  NOT COUNTING THE TRANSITION YEAR
        by firm_id (ceo_spell fyear): gen byte wanted3 = wanted1 ///
            & tenure[_n-1] >= 2 & tenure >= 3
            
        //  IDENTIFY FIRST TRANSITIONS
        by firm_id (ceo_spell fyear): gen byte wantede4 = wanted1 & ceo_spell == 2
        
        //  MARK OBSERVATIONS FOLLOWING A FEMALE TO MALE
        //  TRANSITION OR PRECEDING ANY TRANSITIONS
        by firm_id ceo_spell (fyear): gen byte wanted5 = 1 if wanted2_f_to_m[1] == 1
        
        //  SET MARK TO ZERO IN ANY SPELL THAT PRECEDES A TRANSITIONS
        by firm_id (ceo_spell fyear): gen n_spells = ceo_spell[_N]
        by firm_id ceo_spell (fyear): replace wanted5 = 0 if missing(wanted5) ///
            & ceo_spell < n_spells
        I don't quite understand #4. What I have done is created a variable, wanted4, that identifies the observation corresponding to the first transition. So if you want to do something with transition years that are other than the first, those can be identified by wanted1 == 1 & wanted4 == 0, and you can do what you like with them.

        Comment


        • #5
          Dear Clyde
          Thank you so much. The codes worked perfectly fine for me and this was what I required. Just one more quick question:

          How to find the change in a continuous variable following the CEO transition from year (t-1) to t+1 and t+2?

          Thanks again in advance.




          Last edited by Abdul Ghafoor; 16 Jun 2021, 04:11.

          Comment


          • #6
            That's not actually a quick question. What do we know about this variable? What does theory suggest the change will be? What is known about its distribution? Are there other factors that need to be adjusted for in the analysis? It is likely that the approach will be some kind of regression analysis with a categorical variable identifying those time points as the main predictor, the details can't be set out without more information.

            Comment

            Working...
            X