Announcement

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

  • Generating Post and Treatment dummies for difference in difference around CEO dismissal

    I am examining a difference in difference regression around a CEO dismissal event. For that, I need to create POST and TREATMENT dummies. POST dummy is equal to 1 for the three years after the ceo_dismiss event (including the year of dismissal) and 0 for three years before the ceo_dismissal event. The TREATMENT dummy should be equal to 1 for all 6 years for firms having the ceo_dismiss event and 0 for all 6 years for firms that do not face a CEO dismissal event. In doing so, i will ignore the observations for which i do not have the data for three prior or post-event data. The data span from 1996 to 2018. Any help is much appreciated.

    Here is the data example.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long gvkey double year byte ceo_dismiss
    1004 1996 0
    1004 1997 0
    1004 1998 0
    1004 1999 0
    1004 2000 0
    1004 2001 0
    1004 2002 0
    1004 2003 0
    1004 2004 0
    1004 2005 0
    1004 2006 0
    1004 2007 0
    1004 2008 0
    1004 2009 0
    1004 2010 0
    1004 2011 0
    1004 2012 0
    1004 2013 0
    1004 2014 0
    1004 2015 0
    1004 2017 0
    1013 1996 0
    1013 1997 0
    1013 1998 0
    1013 1999 0
    1013 2000 0
    1013 2001 0
    1013 2002 0
    1013 2003 0
    1013 2004 0
    1013 2005 0
    1013 2006 0
    1013 2008 0
    1013 2009 0
    1034 1997 0
    1034 1998 0
    1034 1999 0
    1034 2000 0
    1034 2001 0
    1034 2002 0
    1034 2003 0
    1034 2004 0
    1034 2005 0
    1034 2006 0
    1034 2007 0
    1045 2017 0
    1045 2018 0
    1075 1996 0
    1075 1997 0
    1075 1998 0
    1075 1999 0
    1075 2000 0
    1075 2001 0
    1075 2002 0
    1075 2003 0
    1075 2013 0
    1075 2014 0
    1075 2015 0
    1075 2016 0
    1075 2017 0
    1075 2018 0
    1078 1996 0
    1078 1997 0
    1078 1998 0
    1078 2002 0
    1078 2003 0
    1078 2004 0
    1078 2005 0
    1078 2006 0
    1078 2007 0
    1094 2015 0
    1094 2016 0
    1094 2017 1
    1111 2003 0
    1111 2004 0
    1111 2005 0
    1111 2006 0
    1111 2007 0
    1203 1996 0
    1209 1996 0
    1209 1997 0
    1209 1998 0
    1209 1999 0
    1209 2000 0
    1209 2001 0
    1209 2002 0
    1209 2003 0
    1209 2004 0
    1209 2005 0
    1209 2006 0
    1209 2007 0
    1209 2008 0
    1209 2009 0
    1209 2010 0
    1209 2011 0
    1209 2012 0
    1209 2013 0
    1209 2014 1
    1209 2015 0
    1209 2016 0
    end

  • #2
    Well, you can get part of the way there with
    Code:
    xtset gvkey year
    gen post = inlist(1, ceo_dismiss, L1.ceo_dismiss, L2.ceo_dismiss)
    by gvkey (year): egen treatment = max(ceo_dismiss)
    But this isn't really the right way to go about it. First of all, you have some firms that have a year with ceo_dismiss == 1, but you don't have the two years after that. And you don't say what you want to do with observations that are more than 3 years before ceo_dismiss or more than 2 years after it. Worse still, you have no way to pick 6 particular years for your untreated firms. And have you even given thought yet to the possibility that some firm may have more than one ceo dismissal event in your data? What do you do with that?

    This data set does not lend itself to the classic DID analysis, because there is no defined time point at which treatment begins for all of the treated firms. Instead each firm that is treated starts treatment at its own individual time point. So what you need is a generalized DID analysis, which does not have a treatment variable and a post variable. Instead you need a single variable, under_treatment, that is 1 in any treated entity once it is treated, and 0 everywhere else. (If you want to consider treatment effects to wear off after the third year, you can set it back to zero then.) Then you do a two-way fixed effects regression of your outcome against under_treatment. The coefficient of under_treatment is then the generalized DID estimator of the effect of CEO dismissal.

    Comment


    • #3
      Thanks for the insights. For firms that do not have two years ahead of the CEO dismissal event, i will use the data that is available (so even one year after CEO's dismissal will work as I can update the data for 2019). The observations that are more than 3 years before ceo_dismiss or more than 2 years after it, I will drop them. I can use two years before and two year after the event window as well. I have checked the data and i do have multiple CEO dismissals per firm in the data, for those firms, i will only utilize the first event for the CEO dismissal and will ignore later such events for that firm.


      I did run a generalized DID with the following code however, i do not know how to interpret it as this ceo_dismiss dummy (which equal 1 in CEO dimssisal event and zero otherwise) only gives me the effect of the event on the dependent variable, but i want to see the impact of an independent variable (x) on (y) after the event to examine if the event changed the earlier positive impact of x on y.

      Code:
      xtreg y i.ceo_dismiss controls i.year, fe vce(cluster gvkey)
      With the generalized DID, the coefficient on i.ceo_dismiss is indeed negative and significant (-.0200 with the t-stat of -2.34) but I do not know how to interpret this in terms of the earlier positive relationship between x and y.

      For this reason, I wanted to apply the classical DID so that I can see if the earlier positive relationship between x and y changed around the event of CEO dismissal.

      I hope I have clarified things a bit now.

      Comment


      • #4
        The code you show in #3 is not what I suggested. The ceo_dismiss variable is only 1 in a single year. What I suggested you use is a variable that starts out as 0, becomes 1 in the CEO dismissal year and then stays 1 thereafter (or at least for some fixed number of years thereafter.)

        Given that your goal is to determine whether the ceo dismissal event is associated with a change in the effect of some variable x's impact on y, then you need an interaction term. So something like this

        Code:
        xtset gvkey year
        gen under_treatment = inlist(1, ceo_dismiss, L1.ceo_dismiss, L2.ceo_dismiss)
        
        xtreg y i.under_treatment##i.x i.year, fe
        This assumes that the x variable is discrete. If it is continuous, use c.x not i.x.

        The coefficient of 1.under_treatment#1.x is your estimate of how much the ceo dismissal event (and its aftermath) modifies the effect of x on y.

        Comment


        • #5
          Thanks a lot Clyde Schechter . This did work. In addition, If I wanted to replicate something from one of the published papers like the following DID based on psmatch sample, how can I proceed further from here on?

          To conduct the test, we create a treatment group consisting of firms that have experienced the sudden death of a CEO
          This is our variable ceo_dismiss
          . We also create a control group, which includes businesses that have not experienced such an event in the same year
          Code:
          bys year: egen total_ceo_dismiss=total(ceo_dismiss)
          gen control=1 if total_ceo_dismiss>0 & ceo_dismiss!=1
          There is ceo dismissal in every year, so i guess this is useless.

          . After applying these criteria, we identify 42 incidents of CEO sudden deaths. We then match treatment and control observations using propensity score matching by choosing the nearest neighbour with the replacement of the same control variables.
          I do have a set of control variables but i do not understand how to match treatment and control observations using psmatch2

          i did the following
          Code:
          psmatch2 ceo_dismiss controls if control==1 | ceo_dismiss==1 , out(y) neighbor(1) noreplacement caliper(0.01)
          To estimate the DiD estimator, we adopt the approach of Hong and Kacperczyk (2010), He and Tian (2013) and Irani and Oesch (2013), measuring and evaluating the effects of such exogenous events on corporate misconduct. Specifcally, we calculate the change in corporate misconduct incidents from the pre-event period (defined as the three years preceding the shock) to the post-event period (defined as the three years following the shock) for both treatment and control groups. The difference is then averaged over the treatment and control groups and reported in Columns 1 and 2, respectively.
          Code:
          gen treated = inlist(1, L1.ceo_dismiss, L2.ceo_dismiss, L3.ceo_dismiss, F1.ceo_dismiss, F2.ceo_dismiss, F3.ceo_dismiss)
          Code:
          gen post=inlist(1, L1.ceo_dismiss, L2.ceo_dismiss, L3.ceo_dismiss)
          I think i am doing some mistake here.
          Code:
            
           diff y [pweight = _weight], t( treatment ) p( post ) cov(controls)
          Here is the output
          Code:
          DIFFERENCE-IN-DIFFERENCES ESTIMATION RESULTS
          Number of observations in the DIFF-IN-DIFF: 912
                      Before         After    
             Control: 808            0           808
             Treated: 57             47          104
                      865            47
          --------------------------------------------------------
           Outcome var.   | y      | S. Err. |   |t|   |  P>|t|
          ----------------+---------+---------+---------+---------
          Before          |         |         |         | 
             Control      | -0.266  |         |         | 
             Treated      | -0.272  |         |         | 
             Diff (T-C)   | -0.007  | 0.018   | -0.36   | 0.715
          After           |         |         |         | 
             Control      | -0.252  |         |         | 
             Treated      | -0.259  |         |         | 
             Diff (T-C)   | -0.007  | 0.018   | 0.36    | 0.715
                          |         |         |         | 
          Diff-in-Diff    | 0.000   |    .    |    .    |    .
          --------------------------------------------------------
          R-square:    0.16
          As we can see the control observations are 0 in the after, and hence no diff-in-diff were shown.

          Required:
          1. Did I execute the DID correctly as per the description from the paper I am replicating?
          2. How can I make sure that the post variable is defined in a way that it is 1 for three years following the CEO dismissal year (excluding the event year) and 0 for three years before the event year (again excluding the year of CEO dismissal)
          3. What modifications are needed if I match the firms using entropy balancing instead of psmatch2? i guess that the blue text criteria will change in my diff regression but not sure what will i use. Maybe _webal!=. but I am not sure that I will be using only the window of three years ahead and three years before the CEO dismissal event.

          Any other suggestions are also welcome.

          Comment


          • #6
            I do not myself use the -psmatch2- command, so I can't help you with that, nor comment whether you are trying to use it correctly or not.

            Concerning your -diff- problem, you have not created the post variable correctly. By defining it the way you have, it will be 0 in all years in the control group, because the control group never has a year where ceo_dismiss == 1. In order to use -diff- with this command, there has to be a time point in each control at which it is considered to be "post"-treatment. Your data do not really lend themselves to that. The best you might hope to do is to get a matched control for each case. That, presumably, is what you are trying to do with -psmatch2-. Once you have a matched control for each case, you must set the variable post in the matched control to exactly match the post variable in the case to which it is paired.

            Comment

            Working...
            X