Announcement

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

  • Stata - Fixed Effects & Newey West Standard errors (Panel data.)

    Hello everyone,

    I have panel data: Firms & Years (2017-2023). I did already a Hausmann test and it showed me that I shoud use the Fixed Effect model.

    The model is:
    Click image for larger version

Name:	ROCE.png
Views:	2
Size:	9.5 KB
ID:	1758121



    I should do the regression equally as the reference paper:

    Charifzadeh, Michel; Herberger, Tim A.; Högerle, Bernadette; Ferencz,
    Marlene (2021): Working Capital Management und dessen Rolle
    als Instrument zur Rentabilitäts- und Unternehmenswertsteuerung:
    Eine empirische Untersuchung über deutsche Blue Chips. In Die
    Unternehmung 75 (4)

    They performed a multiple regression with the robust standard errors of Newey-West and also tested for fixed effects.

    But as I read here in the forum, the Newey West cannot be used with fixed effects model. Is it valid to apply the following:

    Does anyone have any idea how I can do this?

    Thanks in advance!!
    Attached Files
    Last edited by Sebi Albon; 08 Jul 2024, 08:34.

  • #2
    help ivreg2
    help xtivreg2

    you can use NW and don't have to have an instrument

    Comment


    • #3
      I do not know the basis of the authors' method, but if your data is annual, your sample period is too small to consider using Newey-West standard errors. An FE model clustering at the firm level should yield results that are robust to heteroskedasticity and arbitrary forms of serial correlation. However, to answer your original question about obtaining Newey-West standard errors with panel data, see newey2 from SSC.

      Code:
      ssc install newey2, replace
      help newey2

      Comment


      • #4
        Thank you very much for the quick response!

        I have tried it with following code:

        xtset YEAR FIRM_ID
        xtivreg2 ROCE DRO LN_SIZE SGROWTH LEV IND_1-IND_8 L_ROCE, fe robust bw(5)

        And the output is:
        Click image for larger version

Name:	Output 1.png
Views:	1
Size:	41.7 KB
ID:	1758253

        Click image for larger version

Name:	Output.png
Views:	1
Size:	63.0 KB
ID:	1758252



        Now I have noticed that the industry variables (1-8) have been omitted from the output (I think this has to do with the fixed effects). Should they be omitted from the beginning?

        I also ask whether this kernel=Bartlett is the same as the robust standard errors of Newey West? And how high should the bandwidth be set?

        Thank you in advance!!
        Last edited by Sebi Albon; 09 Jul 2024, 08:47.

        Comment


        • #5
          The companies don't change industries, so the IND if captured by the FE.

          Comment


          • #6
            run it with newey2 as well just to check.

            Comment


            • #7
              try bw(auto).

              From help: "When using the Bartlett, Parzen, or Quadratic spectral kernels, the automatic bandwidth selection procedure of Newey and West (1994) can be chosen by specifying bw(auto)."

              Bartlett is default.

              Comment


              • #8
                okey thank you very much! i will try it later.

                Comment


                • #9
                  Also run with xtreg , cluster(FIRM_ID). You've got over 100 firms, so good there.

                  As Andrew suggests, 7 may be too few years for newey-west, though I recognize you are trying to reproduce/replicate results. But just because someone uses the wrong approach before is not permission for you to do the same.

                  Comment


                  • #10
                    Putting in a lagged dependent variable with only six time periods (one lost due to lagging) is likely generating significant bias in the FE estimator. Consistency of FE with fixed ("small") T and N getting large requires strict exogeneity of the explanatory variables, and this is clearly violated by putting in lagged Y. In addition, you cannot justify using Newey-West SEs with such a short time period.

                    The user-written command -xtscc- does what you want -- so called Driscoll-Kraay standard errors -- but their validity relies on a sufficiently large T. They're intended mainly for problems with aggregated data where T is large and N may or may not be very large. You might look to see what the dimensions are in the study you cite.
                    Last edited by Jeff Wooldridge; 09 Jul 2024, 09:35.

                    Comment


                    • #11
                      I was thinking xtlsdvc might work, but it's limited in it's capabilities.

                      xtdpdgmm? it would allow you to use instrumental variables for the lagged Y and permits clustered standard errors.

                      Comment


                      • #12
                        In the cited study they have 115 companies in the dataset and the time horizon is from 2011 to 2017, so more or less the same small size as mine...
                        But they still used fixed effects with robust Newey-West standard errors.

                        What do you think would be best for my data? What standard error can I use to check for fixed effects?

                        This would be the output with Driscoll-Kraay standard errors:
                        Code:
                        xtset FIRM_ID YEAR
                        xtscc ROCE DRO LN_SIZE SGROWTH LEV IND_1-IND_8 L_ROCE, fe
                        Click image for larger version

Name:	Screenshot 2024-07-09 204709.png
Views:	1
Size:	57.7 KB
ID:	1758295
                        Last edited by Sebi Albon; 09 Jul 2024, 12:48.

                        Comment


                        • #13
                          Results are comparable, and I suspect newey2 would be too, as would cluster(id) in xtreg.

                          The question is whether you plan to handle the lagged DV, or if you need to.

                          might look this over, but there are likely many other citations.
                          HTML Code:
                          https://nathanjkelly.utk.edu/wp-content/uploads/2017/10/Keele-kelly-2006.pdf

                          Comment

                          Working...
                          X