Announcement

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

  • Moderators in DID regression

    Hello everyone. I am writing my thesis and I am not sure if what I am doing with DID on Stata is correct since I have a moderator.

    I am looking at the effect of M&A deal on firm performance, with two different moderator effects that I am looking at differently: the effect of a cross-border acquisition and of the fact that the acquirer is a small firm. Therefore I have all these firm that made deals in 2015 and I am looking at the evolution of a profitability ratio from before (2012 2013 2014) til after (2015 2016 2017). I have a dummy variable for before and after treatment (DummyAfter), a dummy for whether the acquisition was cross border or not (CB) and one for whether the acquirer is small or not (S). I also have a dummy for treatment and control group (Completed=1 and Withdrawn =0)). My fixed effects are industry and year (grouped as "both").

    I know the command for a normal DID to see the effect of M&A on the profitability ratio would be: xtreg profitabilityratio DummyCompleted DummyAfter, fe i(both).

    How do I add respectively CB and S as moderators to the command? (it would be two different regressions, one with each moderator)

    Any help would be much appreciated!

  • #2
    If I have understood your explanation correctly, the equation you show for the DID without the moderators is not correct. It should be
    Code:
    xtreg profitabilityratio i.DummyCompleted##i.DummyAfter, fe i(both)
    To incorporate the moderating effects of CB or S is just a matter of expanding this to a three way interaction. For example
    Code:
    xtreg profitabilityratio i.CS##i.DummyCompleted##i.DummyAfter, fe i(both)

    Comment


    • #3
      Yes I forgot to include the interaction in the first equation. Thank you very much! This is very helpful

      Comment


      • #4
        I would have another question. How do I set time and firm fixed effects? I am not sure I understand how it works. In my data I have years and firm's name and industry name and the respective profitability ratios and dummies. I tried to code xtset year and it says it is balanced but when i type with xtset industry it says unbalanced. However i believe I have observations for all years and firms respectively. What should I do? I though I did it correctly before but now I am not so sure anymore.

        Comment


        • #5
          The unit of analysis here, I assume, is the firm. Firms are involved in M&A's, or not. Industries as a whole are not, correct?

          You have a variable with firm name, but you will not be able to use that with -xtset-, because -xtset- requires a numeric variable. The way to get a numeric variable out of a variable with firm name is to use the -encode- command.

          Code:
          encode firm_name_variable, gen(firm_id)
          xtset firm_id year
          now tells Stata that firm_id is the panel identifier. This makes it unnecessary to explicitly put firm-level effects into your -xtreg- command: Stata will now do that for you automatically.

          Do not worry about whether the panels are balanced. This is of no importance for your analysis. It matters only to this extent: if you believe your data, as collected, were balanced, and -xtset- tells you they are not, then something has gone wrong in the creation of this data set and you need to go back and find and fix the errors. But there is no need to have a balanced data set for this.

          To include time fixed effects in the model you must specify them explicitly as i.year.

          Code:
          xtreg profitabilityratio i.DummyCompleted##i.DummyAfter i.year, fe i(both)
          Now, give some serious thought as to whether you really need time-fixed effects in this model. You might be just overfitting noise in the data when you include these. How large is your sample? Is it large enough to supsport that many predictor variables in the regression?

          Assuming you decide to keep them, the i.year time indicators will be colinear with i.DummyAfter, so not all of them will be represented in the output. This is not a problem, but you should be aware of it and not get concerned when you see it.


          As for industry: you must forget about it. You cannot estimate industry effects in a firm-level fixed effects model because industry is a time-invariant attribute of the firm. So if you try to include industry level fixed effects they will be colinear with the firm-level fixed effects and they will be omitted. Remember that one of the advantages of a fixed-effects regression is that all time-invariant attributes of the firms (of which industry is one) are automatically adjusted for. So if you are simply concerned about adjusting for industry-level effects, you don't need to do anything at all. That comes "for free" with the firm-level fixed effects. If you really are interested in actually estimating industry-level effects, that is a different story and it simply is mathematically impossible to do in a firm-level fixed-effects model.

          Comment


          • #6
            Thank you very much with this reply, it is extremely useful as I am a beginner with Stata and econometrics. I was actually thinking about not including fixed effects as the results are not great due to multicollinearity between dummy variables when i include them. When i just run:

            reg profitability ratio i.DummyCompleted##i.DummyAfter

            my results seem more neat. I had the impression fixed effects created more 'overfit noise' exactly as you said. Also I have a control group, would it then be okay to do not include fixed effects due to multicollinearity reasons and the fact that I have a control group ?

            Comment


            • #7
              my sample size is about 750 companies (control group and treatment group together) each with 4 years of profitability ratios, so about 3000 lines on excel in the end

              Comment


              • #8
                That's a large enough sample size that you can include indicators for that number of years if you want to.

                Comment


                • #9
                  If I add time fixed effects and firm fixed effects I get from the xtreg Prob > F = 0.65 for my model, while if I do not include them (reg) I get Prob > F = 0.00. Do you think having only dummies in the regression except for the profitability ratio creates problems because of multicollinearity? I just wonder if adding fixed effects which are dummies will do more bad than good to my results.

                  Comment


                  • #10
                    The model is mis-specified if you do not include time and firm fixed effects. It's not a valid DID model. You must include them.

                    As for the overall model p-value, why do you care about it? The only p-value worth looking at is the p-value for the 1.DummyComplete#1.DummyAfter interaction coefficient's p-value. (And maybe not even that one!)

                    Nevertheless, since you are not comfortable with your findings, why don't you post back with the exact code you ran and the exact output you got from Stata, just to get a fresh eye to look at it and see if anything looks problematic.

                    Comment


                    • #11
                      Here are my results with the fixed effects. I have firm and time fixed effects and to create them i did the following since acquirorname was a string variable. Years is a numeric variables with the years. I also attached how my data looks like. I generated the interaction variables did1, did3 and did3 but here for these results i used the method you suggested. Otherwise I used to run xtreg EBITDAMargin Completed After did1, fe i(both) which I think is the same.

                      . encode AcquirorName, generate (acquirorname1)

                      . egen both = group (acquirorname1 Years)





                      Click image for larger version

Name:	Screenshot 2019-05-21 at 07.54.22.png
Views:	1
Size:	198.1 KB
ID:	1499228

                      Click image for larger version

Name:	Screenshot 2019-05-21 at 07.54.47.png
Views:	1
Size:	121.6 KB
ID:	1499229


                      Last edited by Linda Pasi; 21 May 2019, 00:06.

                      Comment


                      • #12
                        Sorry I'll repost it, something went wrong.

                        Here they are
                        Attached Files

                        Comment


                        • #13
                          Of course, Year changes over the data. I am also attaching the data I imported from excel just so you have the overall picture.
                          Attached Files

                          Comment


                          • #14
                            I am also uploading my results without the fixed effects.
                            Attached Files

                            Comment


                            • #15
                              The code and results look OK to me. It seems that there is an enormous amount of variability in your outcome variable that is unexplained by your model (even with the fixed effects). The sigma_e term is bigger than all of the regression coefficients--so the outcome variable is more noise than signal. (And most of the signal is coming from the unobserved attributes of the panels, as reflected in the enormous value of sigma_u.) Even though you have a rather large sample size, the results imply that the effects of M&A you are trying to tease out here are really very small by comparison.

                              Comment

                              Working...
                              X