Announcement

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

  • Difference in Differences with 3 time periods

    Dear all,

    I am currently analyzing the link between board gender diversity and firm performance. I have a panel data of 264 firms from the S&P500 over the 2006-2015 period. I have 3 periods: before (2006-2007), during (2008-2009) and after the Subprime Crisis (2010-2015)

    It's my first time looking at the difference in differences analysis, I want to see the impact of firms which have more women compare to the firms with less women on their board of directors (before VS during the Crisis).

    I am trying first to do 1) a difference in differences without fixed effects and without control variables, 2) differences in differences with fixed effects but without control variables and finally 3) differences in differences with fixed effect and control variables.

    My main dependent variable is TOBINS'q (firm value) and my main independent variable is WOB (% of women on board). I create a dummy variable called Crisis (=1 if YEAR = 2008 & 2009, = 0 otherwise).

    Questions:

    1) If i am doing a difference in differences, it will show me the difference outside the crisis (pre and post crisis) and during the Crisis right? if i want to see only before and during, how should i do it and do you think it is better ?

    2) Can i use a continuous variable in interaction with my Crisis dummy variable (c.WOB##i.Crisis) ? for now i used the command xtile to create a new variable WOB_quart which gives me 1 (firms with the less women),2 ,3 and 4 (which have the highest percentage of women), i used this new variable WOB_quart to create my dummy variable (WOB_dummy) which gives = 1 if WOB_quart = 4 (top quartile) and 0 if WOB_quart = 1 (bottom quartile)

    I used the following command without FE and control variables :
    Code:
     diff Q2ln_w, t(WOB_dummy) p(Crisis)
    
    DIFFERENCE-IN-DIFFERENCES ESTIMATION RESULTS
    Number of observations in the DIFF-IN-DIFF: 1436
                Before         After    
       Control: 508            166         674
       Treated: 645            117         762
                1153           283
    --------------------------------------------------------
     Outcome var.   | Q2ln_w  | S. Err. |   |t|   |  P>|t|
    ----------------+---------+---------+---------+---------
    Before          |         |         |         |
       Control      | 0.535   |         |         |
       Treated      | 0.577   |         |         |
       Diff (T-C)   | 0.042   | 0.024   | 1.78    | 0.075*
    After           |         |         |         |
       Control      | 0.329   |         |         |
       Treated      | 0.428   |         |         |
       Diff (T-C)   | 0.099   | 0.048   | 2.05    | 0.040**
                    |         |         |         |
    Diff-in-Diff    | 0.057   | 0.054   | 1.06    | 0.290
    --------------------------------------------------------
    R-square:    0.04
    * Means and Standard Errors are estimated by linear regression
    **Inference: *** p<0.01; ** p<0.05; * p<0.1
    
    .
    I don't really know how to interpret the results:

    Is it right to say that "before" the Crisis, the firms from the top quartile "treated" compare to the control group, have a positive effect and significant coefficient (better performance), and same for during the Crisis ("After"). However in general, the results from Diff-in-Diff : it's positive but insignificant effect ?


    Code:
    If i want to include fixed effect first and then adding control variable, should I use xtreg ?
    xtreg Q2ln_w WOB_dummy##Crisis i.YEAR#SIC_group, fe
    &
    xtreg Q2ln_w WOB_dummy##Crisis [Control variables] i.YEAR#SIC_group, fe
    Thanks a lot for your help!

    Stephan

  • #2
    1. First of all--I am curious about the theoretical basis you have for running this model. Why do you think firms with more women on the board would perform differently during the crisis specifically? I ask because this could help clarify the timing of the effect--without knowing the change you have in mind, it is hard to know why we should prefer a time period of 08-09 over other periods (like 08-10, etc).
    2. I would not code your treatment dummy the way you do, with the top quartile as 1 and the bottom quartile as 0 (because one would ideally consider the other two quartiles as well). What you seem to have here is a "treatment intensity" diff-in-diff design, where the continuous treatment (WoB) should be interacted with the time periods. (In other words, unless you have a clear theoretical reason why outcomes should jump up for the top quartile, it seems more likely that your effect should cause firms with more women to have different outcomes in a continuous fashion). The -diff- command from SSC does not support this kind of analysis, but you can just run an equivalent regression model instead.
    3. If you only include a dummy for the crisis period, you are assuming that your dependent variable has the same mean in the pre (2006-2007) and post (2010-2015) periods. That seems unlikely. I would include interactions of treatment with both periods.
    4. It isn't clear to me if the variable SIC_group uniquely identifies each firm, or identifies each firm's industry. Where I use SIC_group below, I mean it to identify each firm (so use your firm id instead if that is a different variable).

    Overall, I would run your analysis this way:
    Code:
    ssc install estout
    local controls "control1 control2" //put whatever controls you are using in this list
    gen postCrisis = year>=2010
    reg Q2ln_w c.WoB##(Crisis postCrisis), cluster(SIC_group)
    est sto model1 // basic DiD model, no FE or controls
    xtreg Q2ln_w c.WoB##(Crisis postCrisis) i.year, fe cluster(SIC_group)
    est sto model2 //DiD with FE, no controls
    xtreg Q2ln_w c.WoB##(Crisis postCrisis) `controls' i.year, fe cluster(SIC_group)
    est sto model3 //DiD with FE and controls
    esttab model1 model2 model3, drop(0.* *.year _cons)indicate("FE = 2006.year" "Controls = `controls'") varwidth(20) se coeflabels("1.crisis" "crisis" "1.postCrisis" "postCrisis" "1.crisis#c.WoB" "crisis * WoB" "1.postCrisis#c.WoB" "postCrisis * WoB")
    That should get you a nice table showing your results. The interpretation of the "crisis * WoB" coefficient (the one of interest) is that during the crisis period, the correlation between women on the company's board and Tobin's Q is higher (or lower) by the amount of the coefficient., relative to the pre-crisis period

    A good resource about DiD is here: http://economics.ozier.com/econ626/l...e3_handout.pdf

    Regarding your specific questions:
    1) If i am doing a difference in differences, it will show me the difference outside the crisis (pre and post crisis) and during the Crisis right? if i want to see only before and during, how should i do it and do you think it is better ?
    Yes, if you only include a crisis dummy, both the pre and post crisis periods will be your counterfactual. It seems strange to expect an effect that appears during the crisis only and then immediately goes away, which is why I have recommended including an interaction with the post-crisis period as well.

    Can i use a continuous variable in interaction with my Crisis dummy variable (c.WOB##i.Crisis) ?
    Yes, that is a treatment intensity DiD. However, you can't run this analysis with the -diff- command. See code above.

    Is it right to say that "before" the Crisis, the firms from the top quartile "treated" compare to the control group, have a positive effect and significant coefficient (better performance), and same for during the Crisis ("After"). However in general, the results from Diff-in-Diff : it's positive but insignificant effect ?
    Yes, that interpretation matches the results--i.e. firms with the top quartile of women on the board seem to perform better both before and during the crisis, but you can't say that their performance *increased* during the crisis (as the diff-in-diff is not significant).

    If i want to include fixed effect first and then adding control variable, should I use xtreg ?
    Yes -- see code above.

    Comment


    • #3
      I saw you posted in a related thread about this issue, so I replied there as well: https://www.statalist.org/forums/for...-in-panel-data

      Comment


      • #4
        Dear Kye,

        Thanks a lot for your help, i also answered to the other post.

        Regarding
        1. First of all--I am curious about the theoretical basis you have for running this model. Why do you think firms with more women on the board would perform differently during the crisis specifically? I ask because this could help clarify the timing of the effect--without knowing the change you have in mind, it is hard to know why we should prefer a time period of 08-09 over other periods (like 08-10, etc).
        Some academic papers showed that women are more risk averse than men, that women are strong/er monitor and if there is a more gender-diverse board (more women), it enhances male's attendance records of board meetings. That is why i am testing the hypothesis of : Firms with more women performed better during the subprime crisis/ less impacted by the subprime crisis compare to the firms with less women

        2. I would not code your treatment dummy the way you do, with the top quartile as 1 and the bottom quartile as 0 (because one would ideally consider the other two quartiles as well). What you seem to have here is a "treatment intensity" diff-in-diff design, where the continuous treatment (WoB) should be interacted with the time periods. (In other words, unless you have a clear theoretical reason why outcomes should jump up for the top quartile, it seems more likely that your effect should cause firms with more women to have different outcomes in a continuous fashion). The -diff- command from SSC does not support this kind of analysis, but you can just run an equivalent regression model instead.
        3. If you only include a dummy for the crisis period, you are assuming that your dependent variable has the same mean in the pre (2006-2007) and post (2010-2015) periods. That seems unlikely. I would include interactions of treatment with both periods.
        Yep, as you seen in the other post, i tried to do treatment intensity DiD : https://www.statalist.org/forums/for...-in-panel-data

        4. It isn't clear to me if the variable SIC_group uniquely identifies each firm, or identifies each firm's industry. Where I use SIC_group below, I mean it to identify each firm (so use your firm id instead if that is a different variable).
        Sorry i did not specify, SIC_group is a categorical variable (divided in 5 industries) (SIC_group : 1,2,3,4,5).

        here are the results:

        Code:
        . local controls " BOARDSIZELN_w FIRMSIZE2_w LEVERAGE_w "
        
        . reg lnQ2_w c.WOB1_w##(Crisis PostCrisis), cluster(ID)
        
        Linear regression                               Number of obs     =      4,642
                                                        F(5, 421)         =     130.93
                                                        Prob > F          =     0.0000
                                                        R-squared         =     0.0508
                                                        Root MSE          =     .42664
        
                                                  (Std. Err. adjusted for 422 clusters in ID)
        -------------------------------------------------------------------------------------
                            |               Robust
                     lnQ2_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        --------------------+----------------------------------------------------------------
                     WOB1_w |    .315113   .2155647     1.46   0.145    -.1086042    .7388301
                   1.Crisis |  -.2668928   .0228177   -11.70   0.000    -.3117436   -.2220419
               1.PostCrisis |  -.2209005   .0299792    -7.37   0.000    -.2798281   -.1619729
                            |
            Crisis#c.WOB1_w |
                         1  |   .1996989    .150035     1.33   0.184    -.0952121      .49461
                            |
        PostCrisis#c.WOB1_w |
                         1  |   .3666565   .1821569     2.01   0.045     .0086062    .7247067
                            |
                      _cons |   .6299408   .0341152    18.47   0.000     .5628835    .6969982
        -------------------------------------------------------------------------------------
        Code:
        . xtreg lnQ2_w c.WOB1_w##(Crisis PostCrisis) i.YEAR, fe cluster(ID)
        note: 2009.YEAR omitted because of collinearity
        note: 2015.YEAR omitted because of collinearity
        
        Fixed-effects (within) regression               Number of obs     =      4,642
        Group variable: ID                              Number of groups  =        422
        
        R-sq:                                           Obs per group:
             within  = 0.1988                                         min =         11
             between = 0.0003                                         avg =       11.0
             overall = 0.0459                                         max =         11
        
                                                        F(13,421)         =      71.85
        corr(u_i, Xb)  = 0.0002                         Prob > F          =     0.0000
        
                                                  (Std. Err. adjusted for 422 clusters in ID)
        -------------------------------------------------------------------------------------
                            |               Robust
                     lnQ2_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        --------------------+----------------------------------------------------------------
                     WOB1_w |  -.2383365   .1346242    -1.77   0.077    -.5029558    .0262828
                   1.Crisis |  -.2178733   .0197312   -11.04   0.000    -.2566572   -.1790894
               1.PostCrisis |  -.1691388   .0305927    -5.53   0.000    -.2292722   -.1090053
                            |
            Crisis#c.WOB1_w |
                         1  |   .2132565   .1061336     2.01   0.045     .0046387    .4218743
                            |
        PostCrisis#c.WOB1_w |
                         1  |    .379833   .1350365     2.81   0.005     .1144033    .6452628
                            |
                       YEAR |
                      2006  |   .0123357   .0078419     1.57   0.116    -.0030786    .0277499
                      2007  |  -.0165652   .0121687    -1.36   0.174    -.0404843    .0073538
                      2008  |  -.0879205   .0080676   -10.90   0.000    -.1037783   -.0720628
                      2009  |          0  (omitted)
                      2010  |  -.0443065   .0174104    -2.54   0.011    -.0785287   -.0100842
                      2011  |    -.10423   .0154168    -6.76   0.000    -.1345335   -.0739265
                      2012  |  -.0738178   .0133223    -5.54   0.000    -.1000043   -.0476314
                      2013  |   .0153903    .011242     1.37   0.172    -.0067073    .0374878
                      2014  |   .0438542   .0078666     5.57   0.000     .0283915    .0593169
                      2015  |          0  (omitted)
                            |
                      _cons |   .6990297    .020008    34.94   0.000     .6597016    .7383578
        --------------------+----------------------------------------------------------------
                    sigma_u |  .38447977
                    sigma_e |  .19721603
                        rho |  .79169665   (fraction of variance due to u_i)
        -------------------------------------------------------------------------------------
        Code:
        . xtreg lnQ2_w c.WOB1_w##(Crisis PostCrisis) `controls' i.YEAR, fe cluster(ID)
        note: 2009.YEAR omitted because of collinearity
        note: 2015.YEAR omitted because of collinearity
        
        Fixed-effects (within) regression               Number of obs     =      4,642
        Group variable: ID                              Number of groups  =        422
        
        R-sq:                                           Obs per group:
             within  = 0.4630                                         min =         11
             between = 0.0186                                         avg =       11.0
             overall = 0.0588                                         max =         11
        
                                                        F(16,421)         =     100.63
        corr(u_i, Xb)  = -0.5238                        Prob > F          =     0.0000
        
                                                  (Std. Err. adjusted for 422 clusters in ID)
        -------------------------------------------------------------------------------------
                            |               Robust
                     lnQ2_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        --------------------+----------------------------------------------------------------
                     WOB1_w |  -.0653685   .1163214    -0.56   0.574    -.2940116    .1632746
                   1.Crisis |  -.2095749   .0177875   -11.78   0.000    -.2445382   -.1746116
               1.PostCrisis |  -.2631227   .0283327    -9.29   0.000    -.3188139   -.2074316
                            |
            Crisis#c.WOB1_w |
                         1  |   .1666563   .0982836     1.70   0.091    -.0265314     .359844
                            |
        PostCrisis#c.WOB1_w |
                         1  |   .2604889   .1200454     2.17   0.031     .0245259    .4964519
                            |
              BOARDSIZELN_w |  -.1624104   .0384627    -4.22   0.000    -.2380132   -.0868075
                FIRMSIZE2_w |   .3252424   .0188944    17.21   0.000     .2881032    .3623816
                 LEVERAGE_w |  -.0796076   .0949509    -0.84   0.402    -.2662444    .1070292
                            |
                       YEAR |
                      2006  |  -.0365354   .0068915    -5.30   0.000    -.0500815   -.0229893
                      2007  |  -.0856438   .0098643    -8.68   0.000    -.1050332   -.0662544
                      2008  |  -.0061446   .0062392    -0.98   0.325    -.0184085    .0061192
                      2009  |          0  (omitted)
                      2010  |   .0217638   .0141105     1.54   0.124    -.0059719    .0494996
                      2011  |  -.0201749   .0132134    -1.53   0.128    -.0461474    .0057976
                      2012  |  -.0232956   .0108067    -2.16   0.032    -.0445374   -.0020538
                      2013  |  -.0010894   .0094603    -0.12   0.908    -.0196846    .0175058
                      2014  |   .0082813    .007209     1.15   0.251    -.0058889    .0224514
                      2015  |          0  (omitted)
                            |
                      _cons |  -2.048365   .2024454   -10.12   0.000    -2.446295   -1.650436
        --------------------+----------------------------------------------------------------
                    sigma_u |  .46514119
                    sigma_e |  .16151143
                        rho |  .89240349   (fraction of variance due to u_i)
        -------------------------------------------------------------------------------------

        Code:
        . esttab model1 model2 model3, drop(0.* *.YEAR _cons)indicate("FE = 2005.YEAR" "Controls = `cont
        > rols'") varwidth(20) se coeflabels("1.Crisis" "Crisis" "1.PostCrisis" "PostCrisis" "1.Crisis#c
        > .WOB1_w" "Crisis * WOB1_w" "1.PostCrisis#c.WOB1_w" "PostCrisis * WOB1_w")
        
        --------------------------------------------------------------------
                                      (1)             (2)             (3)   
                                   lnQ2_w          lnQ2_w          lnQ2_w   
        --------------------------------------------------------------------
        WOB1_w                      0.315          -0.238         -0.0654   
                                  (0.216)         (0.135)         (0.116)   
        
        Crisis                     -0.267***       -0.218***       -0.210***
                                 (0.0228)        (0.0197)        (0.0178)   
        
        PostCrisis                 -0.221***       -0.169***       -0.263***
                                 (0.0300)        (0.0306)        (0.0283)   
        
        Crisis * WOB1_w             0.200           0.213*          0.167   
                                  (0.150)         (0.106)        (0.0983)   
        
        PostCrisis * WOB1_w         0.367*          0.380**         0.260*  
                                  (0.182)         (0.135)         (0.120)   
        
        FE                             No             Yes             Yes   
        
        Controls                       No              No             Yes   
        --------------------------------------------------------------------
        N                            4642            4642            4642   
        --------------------------------------------------------------------
        Standard errors in parentheses
        * p<0.05, ** p<0.01, *** p<0.001
        So should i go with these results ? my post on the other topic is actually the same as the results of (3), however here (3) industry fixed effect is not included, that is why there is a slight difference compare to the following one :
        Code:
        . reghdfe lnQ2_w WOB1_w c.WOB1_w#i.Crisis c.WOB1_w#i.PostCrisis BOARDSIZELN_w F
        > IRMSIZE2_w LEVERAGE_w, absorb(YEAR#SIC_group ID)
        (MWFE estimator converged in 2 iterations)
        
        HDFE Linear regression                            Number of obs   =      4,642
        Absorbing 2 HDFE groups                           F(   6,   4164) =     314.27
                                                          Prob > F        =     0.0000
                                                          R-squared       =     0.8810
                                                          Adj R-squared   =     0.8674
                                                          Within R-sq.    =     0.3117
                                                          Root MSE        =     0.1594
        
        ------------------------------------------------------------------------------
              lnQ2_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              WOB1_w |    -.01811   .0638666    -0.28   0.777    -.1433226    .1071027
                     |
              Crisis#|
            c.WOB1_w |
                  1  |   .1440847   .0766019     1.88   0.060    -.0060958    .2942653
                     |
          PostCrisis#|
            c.WOB1_w |
                  1  |     .17446    .062448     2.79   0.005     .0520285    .2968914
                     |
        BOARDSIZEL~w |  -.1649864   .0202123    -8.16   0.000    -.2046133   -.1253596
         FIRMSIZE2_w |   .3154398   .0074287    42.46   0.000     .3008756     .330004
          LEVERAGE_w |  -.0725675   .0388583    -1.87   0.062    -.1487506    .0036155
               _cons |  -2.141082   .0838965   -25.52   0.000    -2.305564     -1.9766
        ------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        ----------------------------------------------------------+
              Absorbed FE | Categories  - Redundant  = Num. Coefs |
        ------------------+---------------------------------------|
           YEAR#SIC_group |        55           0          55     |
                       ID |       422           5         417     |
        ----------------------------------------------------------+
        
        .
        Regarding the diffenrence in differences with continous treatment, should i look at the parallel trend assumptions ? this is what i get with the following code:

        Code:
        collapse (mean) lnQ2_w (first) Crisis, by(WOB_dummy YEAR)
        separate lnQ2_w, by(WOB_dummy)
        graph twoway line lnQ2_w? YEAR if Crisis == 0, xline(2008 2009)
        Click image for larger version

Name:	Graphtobinsqparallel.png
Views:	1
Size:	27.2 KB
ID:	1509075


        this is the example with WOB_dummy = 1 if WOB_quart = 4 (top quartile) and WOB_dummy = 0 if WOB_quart = 1 (bottom quartile). However it seems that there is not a real difference, maybe a steeper slope for the bottom quartile ? , and we can see that during Post Crisis, the top quartile is doing better.

        What do you think Kye?


        Again thanks a lot for your help.


        Stephan

        Comment


        • #5
          My main reply is in your other thread--I will answer here about the issues related to Diff in Diff specifically.

          Your interaction of time with industry group in the fixed effects is fine (it is just allowing the time trends to vary by industry--so if your results hold up when including this, it strengthens your case). So you could use reghdfe with the interacted fixed effects in place of the xtreg throughout the code I suggested.

          For the parallel trends assumption--your graph seems mostly fine (but I think you don't want to include "if Crisis==0" in the graph code--that is excluding the values in 2008 and 2009). However, the graph corresponds to the simple case where you are comparing the top and bottom quartiles of WoB only. For the treatment intensity DiD, the best way to construct such a graph is to plot the coefficients of interactions with each year (instead of including just dummies for crisis / post-crisis). Like this:
          Code:
          ssc install coefplot
          reghdfe lnQ2_w WOB1_w c.WOB1_w#io2008.YEAR BOARDSIZELN_w FIRMSIZE2_w LEVERAGE_w, absorb(YEAR#SIC_group ID)
          est sto m4
          coefplot m4, vertical keep(*#c.*) omitted rename("^([0-9]+).*$" = "\1", regex) recast(connected) ciopts(recast(rarea) color(gs12)) xlabel(,angle(90)) ytitle("Estimated Coefficient") xline(3.5 5.5)
          Note that I specify 2008 as the omitted year for the interaction, so all the coefficients will be expressed relative to that year. Note also that while the years appear on the x axis, they are stored by Stata as numbers starting at 1, so the xline() coordinates have to be specified a little differently.

          This graph shows you how the relationship between women on the board and firm performance changes over time, relative to the 2008 value. If the values are not significantly different from zero before 2008, this supports parallel trends. What is nice about this graph is it shows the relationship conditional on all the fixed effects and covariates--so it is plotting the variation that is actually used for the diff-in-diff.

          Comment


          • #6
            Dear Kye,

            Thanks a lot for your answer.

            For the parallel trends assumption--your graph seems mostly fine (but I think you don't want to include "if Crisis==0" in the graph code--that is excluding the values in 2008 and 2009). However, the graph corresponds to the simple case where you are comparing the top and bottom quartiles of WoB only. For the treatment intensity DiD, the best way to construct such a graph is to plot the coefficients of interactions with each year (instead of including just dummies for crisis / post-crisis). Like this:
            Regarding this graph, without "Crisis == 0" it gives me the following graph:
            Click image for larger version

Name:	Graphtobinsqparallel_includingcrisis.png
Views:	1
Size:	30.8 KB
ID:	1509218


            It seems that the drop regarding firm values occurs before 2008, I don't really know what to say about this graph, because it seems that it follows the same trend even during the crisis period, however differently during post-crisis. The top quartile is doing better during Post-Crisis period.

            For the treatment intensity DiD:

            Code:
            . reghdfe lnQ2_w WOB1_w c.WOB1_w#io2008.YEAR BOARDSIZELN_w FIRMSIZE2_w LEVERAGE
            > _w, absorb(YEAR#SIC_group ID)
            (MWFE estimator converged in 2 iterations)
            
            HDFE Linear regression                            Number of obs   =      4,642
            Absorbing 2 HDFE groups                           F(  14,   4156) =     135.06
                                                              Prob > F        =     0.0000
                                                              R-squared       =     0.8812
                                                              Adj R-squared   =     0.8673
                                                              Within R-sq.    =     0.3127
                                                              Root MSE        =     0.1594
            
            ------------------------------------------------------------------------------
                  lnQ2_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                  WOB1_w |  -.1341782   .0984353    -1.36   0.173     -.327164    .0588076
                         |
                    YEAR#|
                c.WOB1_w |
                   2006  |   .0978444   .1228817     0.80   0.426    -.1430696    .3387583
                   2007  |   .2301796   .1215602     1.89   0.058    -.0081435    .4685026
                   2008  |   .2787998   .1219594     2.29   0.022     .0396941    .5179055
                   2009  |   .2426984   .1218291     1.99   0.046     .0038481    .4815486
                   2010  |   .2150556   .1244466     1.73   0.084    -.0289263    .4590376
                   2011  |   .2721992   .1234561     2.20   0.028     .0301591    .5142393
                   2012  |   .3174921   .1238058     2.56   0.010     .0747664    .5602177
                   2013  |   .3868725   .1233584     3.14   0.002     .1450242    .6287209
                   2014  |   .2938863   .1222701     2.40   0.016     .0541716    .5336011
                   2015  |   .2651603   .1217808     2.18   0.030     .0264048    .5039158
                         |
            BOARDSIZEL~w |  -.1651943   .0202296    -8.17   0.000    -.2048551   -.1255335
             FIRMSIZE2_w |   .3156724   .0074376    42.44   0.000     .3010907    .3302542
              LEVERAGE_w |  -.0710676    .038879    -1.83   0.068    -.1472914    .0051561
                   _cons |  -2.143426   .0839837   -25.52   0.000    -2.308079   -1.978773
            ------------------------------------------------------------------------------
            
            Absorbed degrees of freedom:
            ----------------------------------------------------------+
                  Absorbed FE | Categories  - Redundant  = Num. Coefs |
            ------------------+---------------------------------------|
               YEAR#SIC_group |        55           0          55     |
                           ID |       422           5         417     |
            ----------------------------------------------------------+
            It seems that the year of 2006 is not statistically different from 0, however not the case for 2007. If i understand well all the interaction coefficients are positive and significant relative to year 2008, only 2006 is not significant and 2007 & 2010 positive and significant at 10% level). Here is the graph of the coefficient interactions:

            Click image for larger version

Name:	Graphcoeff.png
Views:	1
Size:	30.8 KB
ID:	1509219


            Is it possible to let me know your thoughts/analysis about this results? I am not sure to have understand well how to interpret this graph, the fact that it is relative to year 2008.

            PS: When i tried to redo the commands for the table, i included the industry fixed effect with YEAR (=YEAR#SIC_group) / diff in diffs without fe, without control variables, diff in diffs with fe but without control variables, and diff in diffs with fe and control variables:

            Code:
            . esttab model1 model2 model3, drop(0.* *.YEAR _cons)indicate("FE = 2005.YEAR"
            > "Controls = `controls'") varwidth(20) se coeflabels("1.Crisis" "Crisis" "1.Po
            > stCrisis" "PostCrisis" "1.Crisis#c.WOB1_w" "Crisis * WOB1_w" "1.PostCrisis#c.
            > WOB1_w" "PostCrisis * WOB1_w")
            coefficient 2005.YEAR not found
            r(111);
            it gives me an error,

            Thanks a lot for your explanations and precious help!

            Stephan


            Comment


            • #7
              Originally posted by Stephan Yan View Post
              It seems that the drop regarding firm values occurs before 2008, I don't really know what to say about this graph, because it seems that it follows the same trend even during the crisis period, however differently during post-crisis. The top quartile is doing better during Post-Crisis period.
              I agree, the graph supports parallel trends for the top versus bottom quartile of women on board. The bottom quartile firms have a slightly higher dip in 2008, but it isn't driving the differences. Interestingly, this graph suggests that the top quartile firms only start performing unusually better in 2013 or so--long after the crisis. However, because this figure doesn't correspond to your primary analysis (as it has no fixed effects and uses quartiles), I wouldn't use it as your main illustration of the trends at work.

              Originally posted by Stephan Yan View Post
              For the treatment intensity DiD: [...]
              It seems that the year of 2006 is not statistically different from 0, however not the case for 2007. If i understand well all the interaction coefficients are positive and significant relative to year 2008, only 2006 is not significant and 2007 & 2010 positive and significant at 10% level). Here is the graph of the coefficient interactions:
              [...]
              Is it possible to let me know your thoughts/analysis about this results? I am not sure to have understand well how to interpret this graph, the fact that it is relative to year 2008.
              Your regression output is off, because I made an error in my suggested code. The 2008 coefficient should be dropped and 2005 included. To do this, your model should have "c.WOB1_w#ib2008.YEAR" instead of "c.WOB1_w#io2008.YEAR" (i.e. replace the "o" with a "b" before the "2008"). This also requires a change to the graph code. So the fixed code to run would be this:
              Code:
              reghdfe lnQ2_w WOB1_w c.WOB1_w#ib2008.YEAR BOARDSIZELN_w FIRMSIZE2_w LEVERAGE_w, absorb(YEAR#SIC_group ID) cluster(ID)
              est sto m4
              coefplot m4, vertical keep(*#c*) baselevels omitted rename("^([0-9]+).*$" = "\1", regex) recast(connected) ciopts(recast(rarea) color(gs12)) xlabel(,angle(90)) ytitle("Estimated Coefficient") xline(3.5 5.5)
              Once you do this, your graph should make more sense. (It will be showing whether the relationship between WoB and Q is significantly different from the relationship in 2008 for every year, after controlling for the fixed effects and other covariates).

              Originally posted by Stephan Yan View Post
              PS: When i tried to redo the commands for the table, i included the industry fixed effect with YEAR (=YEAR#SIC_group) / diff in diffs without fe, without control variables, diff in diffs with fe but without control variables, and diff in diffs with fe and control variables:
              [...]
              it gives me an error
              The error happens because reghdfe doesn't include the fixed effects in its table of coefficients, so there is no "2005.year" value for esttab to look for. A (kind of hacky) fix is to add "i.year" to the x variables in the reghdfe commands. All those coefficients will be dropped (and reghdfe will give errors), but the empty coefficients will stay around in the table of results, so esttab will be able to use them to indicate the presence of fixed effects. Note also that your Crisis and PostCrisis values will be zero with reghdfe (since they are dropped by the fixed effects) - you could add those variables to the list of variables in the drop() option to clean up the table.






              Comment


              • #8
                Dear Kye,

                Thanks for your reply.

                I made also the graph for the parallel trends assumption with ROA as the dependent variable for the TO VS BOTTOM quartile:

                Code:
                 
                collapse (mean) ROA_w (first) Crisis, by(WOB_dummy YEAR)
                separate ROA_w, by(WOB_dummy)
                graph twoway line ROA_w? YEAR, xline(2008 2009)
                Click image for larger version

Name:	GraphROAparallel_WOB_quart_includingcrisis.png
Views:	1
Size:	31.6 KB
ID:	1509378


                It is interesting to see how the top quartile is stabilized compare to the bottom quartile regarding the ROA. Even if there is a high peak between 2006 and 2007 for the top quartile, is it safe to say that it support the parallel trends assumption? It seems that for PostCrisis it follows the same trend (even if there is a slight difference between 2009 and 2010).


                With the new code i get the following results:

                Code:
                . reghdfe lnQ2_w WOB1_w c.WOB1_w#ib2008.YEAR BOARDSIZELN_w FIRMSIZE2_w LEVERAGE
                > _w, absorb(YEAR#SIC_group ID)
                (MWFE estimator converged in 2 iterations)
                
                HDFE Linear regression                            Number of obs   =      4,642
                Absorbing 2 HDFE groups                           F(  14,   4156) =     135.06
                                                                  Prob > F        =     0.0000
                                                                  R-squared       =     0.8812
                                                                  Adj R-squared   =     0.8673
                                                                  Within R-sq.    =     0.3127
                                                                  Root MSE        =     0.1594
                
                ------------------------------------------------------------------------------
                      lnQ2_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                      WOB1_w |   .1446216   .0925189     1.56   0.118    -.0367649    .3260081
                             |
                        YEAR#|
                    c.WOB1_w |
                       2005  |  -.2787998   .1219594    -2.29   0.022    -.5179055   -.0396941
                       2006  |  -.1809554   .1182951    -1.53   0.126    -.4128771    .0509663
                       2007  |  -.0486202   .1161183    -0.42   0.675    -.2762742    .1790338
                       2009  |  -.0361014    .115786    -0.31   0.755    -.2631039    .1909011
                       2010  |  -.0637441   .1187048    -0.54   0.591    -.2964691    .1689809
                       2011  |  -.0066006   .1178449    -0.06   0.955    -.2376395    .2244384
                       2012  |   .0386923   .1183013     0.33   0.744    -.1932415    .2706261
                       2013  |   .1080728   .1178641     0.92   0.359    -.1230038    .3391494
                       2014  |   .0150866   .1168588     0.13   0.897    -.2140192    .2441923
                       2015  |  -.0136395   .1163941    -0.12   0.907    -.2418342    .2145553
                             |
                BOARDSIZEL~w |  -.1651943   .0202296    -8.17   0.000    -.2048551   -.1255335
                 FIRMSIZE2_w |   .3156724   .0074376    42.44   0.000     .3010907    .3302542
                  LEVERAGE_w |  -.0710676    .038879    -1.83   0.068    -.1472914    .0051561
                       _cons |  -2.143426   .0839837   -25.52   0.000    -2.308079   -1.978773
                ------------------------------------------------------------------------------
                
                Absorbed degrees of freedom:
                ----------------------------------------------------------+
                      Absorbed FE | Categories  - Redundant  = Num. Coefs |
                ------------------+---------------------------------------|
                   YEAR#SIC_group |        55           0          55     |
                               ID |       422           5         417     |
                ----------------------------------------------------------+
                here's the new graph:
                Click image for larger version

Name:	Graphtobinsqparallel_relativetocrisis.png
Views:	1
Size:	33.5 KB
ID:	1509373



                Indeed, now i can see that it is relative to the year 2008, it seems that only year 2005 is negative & statistically significant relative to 2008. The others coefficients are insignificant. I am not sure what to say about this graph, can you please let me know your thoughts about this graph and how i should use it ?

                Thanks for your help Kye.


                Stephan




                Last edited by Stephan Yan; 25 Jul 2019, 04:53.

                Comment


                • #9
                  Wanted to edit my previous post but could not do it, so i complete my previous post here :

                  The same graph as my previous post, with labels:
                  Click image for larger version

Name:	Graph_relativeto2008_Q.png
Views:	1
Size:	44.0 KB
ID:	1509415



                  For ROA:

                  Code:
                  . reghdfe ROA_w WOB1_w c.WOB1_w#ib2008.YEAR BOARDSIZELN_w FIRMSIZE2_w LEVERAGE_
                  > w, absorb(YEAR#SIC_group ID)
                  (MWFE estimator converged in 2 iterations)
                  
                  HDFE Linear regression                            Number of obs   =      4,642
                  Absorbing 2 HDFE groups                           F(  14,   4156) =      50.04
                                                                    Prob > F        =     0.0000
                                                                    R-squared       =     0.6238
                                                                    Adj R-squared   =     0.5799
                                                                    Within R-sq.    =     0.1443
                                                                    Root MSE        =     0.0447
                  
                  ------------------------------------------------------------------------------
                         ROA_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                        WOB1_w |   .0238428   .0259152     0.92   0.358    -.0269649    .0746505
                               |
                          YEAR#|
                      c.WOB1_w |
                         2005  |  -.0337569   .0341617    -0.99   0.323    -.1007322    .0332184
                         2006  |  -.0339229   .0331353    -1.02   0.306    -.0988859    .0310401
                         2007  |   .0249959   .0325256     0.77   0.442    -.0387717    .0887635
                         2009  |   .0496581   .0324325     1.53   0.126     -.013927    .1132432
                         2010  |  -.0027266   .0332501    -0.08   0.935    -.0679146    .0624614
                         2011  |   .0182244   .0330092     0.55   0.581    -.0464913    .0829402
                         2012  |  -.0238503   .0331371    -0.72   0.472    -.0888167    .0411161
                         2013  |  -.0207365   .0330146    -0.63   0.530    -.0854628    .0439898
                         2014  |  -.0427032    .032733    -1.30   0.192    -.1068774     .021471
                         2015  |  -.0454677   .0326029    -1.39   0.163    -.1093868    .0184513
                               |
                  BOARDSIZEL~w |  -.0335619   .0056665    -5.92   0.000    -.0446712   -.0224527
                   FIRMSIZE2_w |    .040961   .0020833    19.66   0.000     .0368765    .0450454
                    LEVERAGE_w |   -.153213   .0108903   -14.07   0.000    -.1745638   -.1318622
                         _cons |  -.2173837   .0235244    -9.24   0.000    -.2635042   -.1712632
                  ------------------------------------------------------------------------------
                  
                  Absorbed degrees of freedom:
                  ----------------------------------------------------------+
                        Absorbed FE | Categories  - Redundant  = Num. Coefs |
                  ------------------+---------------------------------------|
                     YEAR#SIC_group |        55           0          55     |
                                 ID |       422           5         417     |
                  ----------------------------------------------------------+
                  The Graph:
                  Click image for larger version

Name:	Graph_relativeto2008_roa.png
Views:	1
Size:	87.2 KB
ID:	1509414


                  It seems that all the coefficients are insignificant relative to year 2008 for ROA. How should i interpret this graph and results in my study?
                  Same as for the graph relation between WOB and Tobin's Q.

                  Thanks a lot Kye!

                  Stephan

                  Comment


                  • #10
                    For the RoA graph with two groups, when you say
                    is it safe to say that it support the parallel trends assumption?
                    note that the graph without confidence intervals can suggest if parallel trends are holding, but it is not a statistical test. Visually, the parallel trends don't seem great--the two groups diverge starting in 2007, before the crisis. But I would not focus on interpreting these graphs--they just help you see the raw patterns over time, and aren't taking into account all the factors in your model.

                    The way to statistically test if you have parallel trends is to run a joint significance test on the interactions with years for the "pre" period. So for your main Tobin's Q model (the one used to generate the graph), this would be
                    Code:
                    test 2005.YEAR#c.WOB1_w 2006.YEAR#c.WOB1_w 2007.YEAR#c.WOB1_w
                    This tests whether the three interactions in 2005, 2006, and 2007 are jointly significantly different from zero--so if you reject the null, you reject parallel trends.

                    Your main graphs of the model (from coefplot) seem good. I would note (on the graph, either in the ytitle or with a note() option) that the shaded areas are 95% confidence intervals. Also, if you have Stata 15 or higher, you can set the fill color as "gs12%50" instead of just "gs12" to get a nice transparent effect.

                    Unfortunately, the graphs for both Tobin's Q and ROA look like the parallel trends aren't great. Notice that the coefficients in both graphs are rising from 2005-2007--so this says firms with more women on the board were doing better and better over time (i.e. the WoB and y variable correlation was increasing) even before the crisis happened. So it is hard to tell if the rise after the crisis is just a continuation of this previous trend, or some effect of the crisis itself.


                    Comment


                    • #11
                      Dear Kye,

                      Thanks for your reply.

                      Indeed, i will not focus too much on the "parallel trends assumption" graphs (the TOP vs Bottom quartile, WOB_dummy).

                      If i am understanding well, in order to test the parallel trend assumption:

                      I need to use the following code, the one that you suggested me to construct the last graphs :

                      For ROA

                      Code:
                      .  reghdfe ROA_w WOB1_w c.WOB1_w#ib2008.YEAR BOARDSIZELN_w FIRMSIZE2_w LEVERAGE
                      > _w, absorb(YEAR#SIC_group ID)
                      (MWFE estimator converged in 2 iterations)
                      
                      HDFE Linear regression                            Number of obs   =      4,642
                      Absorbing 2 HDFE groups                           F(  14,   4156) =      50.04
                                                                        Prob > F        =     0.0000
                                                                        R-squared       =     0.6238
                                                                        Adj R-squared   =     0.5799
                                                                        Within R-sq.    =     0.1443
                                                                        Root MSE        =     0.0447
                      
                      ------------------------------------------------------------------------------
                             ROA_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                            WOB1_w |   .0238428   .0259152     0.92   0.358    -.0269649    .0746505
                                   |
                              YEAR#|
                          c.WOB1_w |
                             2005  |  -.0337569   .0341617    -0.99   0.323    -.1007322    .0332184
                             2006  |  -.0339229   .0331353    -1.02   0.306    -.0988859    .0310401
                             2007  |   .0249959   .0325256     0.77   0.442    -.0387717    .0887635
                             2009  |   .0496581   .0324325     1.53   0.126     -.013927    .1132432
                             2010  |  -.0027266   .0332501    -0.08   0.935    -.0679146    .0624614
                             2011  |   .0182244   .0330092     0.55   0.581    -.0464913    .0829402
                             2012  |  -.0238503   .0331371    -0.72   0.472    -.0888167    .0411161
                             2013  |  -.0207365   .0330146    -0.63   0.530    -.0854628    .0439898
                             2014  |  -.0427032    .032733    -1.30   0.192    -.1068774     .021471
                             2015  |  -.0454677   .0326029    -1.39   0.163    -.1093868    .0184513
                                   |
                      BOARDSIZEL~w |  -.0335619   .0056665    -5.92   0.000    -.0446712   -.0224527
                       FIRMSIZE2_w |    .040961   .0020833    19.66   0.000     .0368765    .0450454
                        LEVERAGE_w |   -.153213   .0108903   -14.07   0.000    -.1745638   -.1318622
                             _cons |  -.2173837   .0235244    -9.24   0.000    -.2635042   -.1712632
                      ------------------------------------------------------------------------------
                      
                      Absorbed degrees of freedom:
                      ----------------------------------------------------------+
                            Absorbed FE | Categories  - Redundant  = Num. Coefs |
                      ------------------+---------------------------------------|
                         YEAR#SIC_group |        55           0          55     |
                                     ID |       422           5         417     |
                      ----------------------------------------------------------+
                      Then:

                      Code:
                      . test 2005.YEAR#c.WOB1_w 2006.YEAR#c.WOB1_w 2007.YEAR#c.WOB1_w
                      
                       ( 1)  2005.YEAR#c.WOB1_w = 0
                       ( 2)  2006.YEAR#c.WOB1_w = 0
                       ( 3)  2007.YEAR#c.WOB1_w = 0
                      
                             F(  3,  4156) =    1.46
                                  Prob > F =    0.2222
                      The significance level of the test is 0.22, which means that we can not reject the null hypothesis and therefore support the parallel trends assumption?

                      Same for Tobin's Q :

                      Code:
                      . reghdfe Q2ln_w WOB1_w c.WOB1_w#ib2008.YEAR BOARDSIZELN_w FIRMSIZE2_w LEVERAGE
                      > _w, absorb(YEAR#SIC_group ID)
                      variable Q2ln_w not found
                      r(111);
                      
                      . reghdfe lnQ2_w WOB1_w c.WOB1_w#ib2008.YEAR BOARDSIZELN_w FIRMSIZE2_w LEVERAGE
                      > _w, absorb(YEAR#SIC_group ID)
                      (MWFE estimator converged in 2 iterations)
                      
                      HDFE Linear regression                            Number of obs   =      4,642
                      Absorbing 2 HDFE groups                           F(  14,   4156) =     135.06
                                                                        Prob > F        =     0.0000
                                                                        R-squared       =     0.8812
                                                                        Adj R-squared   =     0.8673
                                                                        Within R-sq.    =     0.3127
                                                                        Root MSE        =     0.1594
                      
                      ------------------------------------------------------------------------------
                            lnQ2_w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                            WOB1_w |   .1446216   .0925189     1.56   0.118    -.0367649    .3260081
                                   |
                              YEAR#|
                          c.WOB1_w |
                             2005  |  -.2787998   .1219594    -2.29   0.022    -.5179055   -.0396941
                             2006  |  -.1809554   .1182951    -1.53   0.126    -.4128771    .0509663
                             2007  |  -.0486202   .1161183    -0.42   0.675    -.2762742    .1790338
                             2009  |  -.0361014    .115786    -0.31   0.755    -.2631039    .1909011
                             2010  |  -.0637441   .1187048    -0.54   0.591    -.2964691    .1689809
                             2011  |  -.0066006   .1178449    -0.06   0.955    -.2376395    .2244384
                             2012  |   .0386923   .1183013     0.33   0.744    -.1932415    .2706261
                             2013  |   .1080728   .1178641     0.92   0.359    -.1230038    .3391494
                             2014  |   .0150866   .1168588     0.13   0.897    -.2140192    .2441923
                             2015  |  -.0136395   .1163941    -0.12   0.907    -.2418342    .2145553
                                   |
                      BOARDSIZEL~w |  -.1651943   .0202296    -8.17   0.000    -.2048551   -.1255335
                       FIRMSIZE2_w |   .3156724   .0074376    42.44   0.000     .3010907    .3302542
                        LEVERAGE_w |  -.0710676    .038879    -1.83   0.068    -.1472914    .0051561
                             _cons |  -2.143426   .0839837   -25.52   0.000    -2.308079   -1.978773
                      ------------------------------------------------------------------------------
                      
                      Absorbed degrees of freedom:
                      ----------------------------------------------------------+
                            Absorbed FE | Categories  - Redundant  = Num. Coefs |
                      ------------------+---------------------------------------|
                         YEAR#SIC_group |        55           0          55     |
                                     ID |       422           5         417     |
                      ----------------------------------------------------------+


                      Code:
                      . test 2005.YEAR#c.WOB1_w 2006.YEAR#c.WOB1_w 2007.YEAR#c.WOB1_w
                      
                       ( 1)  2005.YEAR#c.WOB1_w = 0
                       ( 2)  2006.YEAR#c.WOB1_w = 0
                       ( 3)  2007.YEAR#c.WOB1_w = 0
                      
                             F(  3,  4156) =    2.16
                                  Prob > F =    0.0904


                      The significance level of the test is 0.0904, which means we can reject the hypothesis at the 10% level but not at the 5% level?

                      Unfortunately, the graphs for both Tobin's Q and ROA look like the parallel trends aren't great
                      After looking at the results, it seems that it's OK at least for ROA ? and for TOBIN'S Q...

                      Thanks!

                      Stephan

                      Comment


                      • #12
                        Your code for the tests of parallel trends looks correct to me. It looks like those tests do help your case. But remember that failing to reject the null does not mean we accept the null--it could be that you don't find non-parallel trends just because of imprecision in your data (i.e. big confidence intervals). I would still be a little concerned about the Tobin's Q results (since, as you say, you can reject parallel trends at the 10% level), but it isn't a critical problem. Ultimately, I would report these results in your paper, and readers can draw their own conclusions.

                        Comment


                        • #13
                          Thanks alot for your help Kye!

                          Stephan

                          Comment


                          • #14
                            I have a pooled cross-section dataset of 788 firms for the period of 2006-2017. There was an exogenous shock in 2009 to all my set of firms due to which some became treated and some remained untreated in the post-period. To find out the counterfactual sample in the pre-period for the treated group in the post-period, I have used propensity score matching methods. Thereafter, I have employed a difference-in-difference methodology to find the impact of the treatment on the outcome.
                            Now, my objective is to show graphically the differential impact of the treatment on the outcome for the treated and control group in the pre-post period
                            I am also attaching a graph from the paper I am following. I want to make a similar graph to show graphically the differential impact of the treatment in my study.
                            Please help me in this regard


                            Attached Files

                            Comment


                            • #15
                              Thank you for sharing the code. It is super useful!
                              Do any statalisters know how to code the rarea with different colors for pre/post treatment?
                              Thank you

                              Comment

                              Working...
                              X