Announcement

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

  • Fixed Effects on countries and dummy omitted

    Hi all,

    I'm currently working on my master thesis on corporate bond spreads based on commodity price changes in 2022 as the main dependent variable. However, I am struggling to understand why my fixed effects and dummy variable are omitted.

    The dataset is a panel data of 396 bonds with each 257 values for every trading day with the main dependent variable being gas/oil. I included a dummy variable for utility companies as my hypothesis assumes utility companies were hit worse during this period due to the commodity price volatility. As per my professors suggestion I also tried adding country fixed effects. However, now I seem to struggle to understand why the country fixed effects are omitted and why the utility dummy variable is also omitted if I use a fixed effects model, as this issue doesn't arise when I use a model without FE. I ran the regression based on their tickers (so they would be grouped).
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	51.9 KB
ID:	1710888


  • #2
    Your panel effect was declared as the ISIN_nr. I don't know what that is, but I'm going to hypothesize that all observations at any time for a given ISIN_nr all have the same country, and that they also either are all utilities or all non-utilities. Fixed-effects models cannot include variables that are constant over time within the panel. That is why country and utility indicators are being omitted.

    The reason such constant-within-panel variables must be omitted in fixed-effects models is that they are colinear with the fixed-effects themselves. You cannot have two colinear variables in the same regression model of any kind.

    Those variables are not eliminated with -regress- because in -regress- you do not have the ISIN_nr represented, so country and utility are not colinear with anything.

    Comment


    • #3
      Steven:
      as an aside to Clyde's excellent advice, I would add that you have a long T dimension in your panel dataset, as it is often the case with finnacial econometrics.
      Threrefore, I'd take a look at -xtregar-, too..
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        dear Clyde Schechter,

        are the following commands correct in two-way models?

        Code:
         xtreg y x1 x2 i.year,fe vce(robust)
        xtreg y x1 x2 i.year,re vce(robust)


        Do the models here give us both two-way fixed-effects and two-way random effects estimates?

        Comment


        • #5
          The first gives a two-way fixed effects model.

          The second gives a model with random panel-level effects and fixed year effects. It is also possible, with different code, to have a model with crossed panel and year random effects, but this is seldom done.

          My responses are to be understood as generic. The applicability of such models, and the limitations incurred if x1 or x2 is colinear with the fixed effects in the model (or the random effects in the second model) obviously depend specifically on what x1 and x2 are.

          Comment


          • #6
            dear Clyde Schechter,
            Actually, with the codes here, my aim is to compare two-way fixed effects and two-way random effects with the help of the hausman test.
            I understand from your answer that my first command gives me two-way fixed effects, but the second command does not exactly give me two-way random effects.
            Is it possible to do a bidirectional hausman test? The community-contributed -xtoverid- or mundlak approach is recommended but my advisor says these commands are not applicable to us and we should use the hausman test

            Comment


            • #7
              Well, I think you need to have a longer discussion with your advisor about what is wanted. You cannot do a two-way random effects model with -xtreg-. The closest you can come to that is what you showed in #4, but in that model there is no random effect for time. To get that, you have to go to -mixed-: -mixed y x1 x2 || _all: panel_var || time:-. But then you cannot run the Hausman test because the terms in the bottom level of the model are different. Frankly, the two-way random effects model you speak of is very rarely used; I don't think I can remember ever seeing one.

              So I think you need to lay this all out with your advisor and get clarity on what he or she wants you to do. I have my own thoughts on the matter, but at this point in your career, your advisor's wishes are your commands unless what is asked of you is impossible or outlandish.

              Comment


              • #8
                thank you so much for your reply.
                I agree with what you said about my advisor.
                I will follow your advice.
                I wish the best for you.

                Comment

                Working...
                X