Announcement

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

  • Inclusion and Exclusion of Time- and Entity-Fixed Effects

    Hi there,
    In recent times, this Forum has been extremely useful to me. Thank you all. I am posting this first very thread because I would like to check if my way of using xtreg is correct. I promise, this will not be long.

    This is what I want to do:
    Using a panel dataset, I want to run a Fixed-Effects regression that comprises many variables. However, I also want to run a total of five model specifications, gradually adding year- and firm-fixed effects, as well as control variables.

    So, my intention would be the following:
    Specification (1): Only the main regressor, NO firm-, NO year-fixed effects
    Specification (2): Only the main regressor, NO firm-, YES year-fixed effects
    Specification (3): Only the main regressor, YES firm-, YES year-fixed effects
    Specification (4) Like (3), but with a first set of CVs
    Specification (5): Like (4), but with a second set of CVs

    This is what I am doing:

    Code:
    xtset firm_id fyear
    
    *1 xtreg log_pub l_output, vce(cluster firm_id)  
    *2 xtreg log_pub l_output i.fyear, vce(cluster firm_id)
    *3 xtreg log_pub l_output i.fyear, fe vce(cluster firm_id)
    *4 xtreg log_pub l_output lassets q roa xrdta ppeta i.fyear, fe (vce cluster firm_id)
    *5 xtreg log_pub l_output lassets q roa xrdta leverage cheta firm_age analysts_assets ppeta i.fyear, fe vce(cluster firm_id)
    Where firm_id is my entity identifier; fyear is my time variable, defined as the year of the observation, i.e. 1991, 1992, ..., 2014; log_pub is my main regressor, and all the others are control variables. Please notice I am using i.fyear to include time-fixed effects.


    My concerns are:
    1) Is it correct to use xtreg in specifications 1) and 2), considered that I want no time- nor firm-fixed effects? Should I use regress instead with i.fyear in spec. 2), so to use Pooled OLS?
    2) My time variable fyear is defined as the year associated with the observation, in the form of 1991, 1992, ... 2010 and so on. Is this okay when including year-fixed effects with i.fyear?
    Last edited by Emanuele Avolio; 21 Jul 2023, 11:15.

  • #2
    1) Is it correct to use xtreg in specifications 1) and 2), considered that I want no time- nor firm-fixed effects? Should I use regress instead with i.fyear in spec. 2), so to use Pooled OLS?
    No, it's not correct. When you use -xtreg-, you automatically get panel variable fixed effects. So if you don't want those, revert to -regress-.
    2) My time variable fyear is defined as the year associated with the observation, in the form of 1991, 1992, ... 2010 and so on. Is this okay when including year-fixed effects with i.fyear?
    Yes.

    Comment


    • #3
      Mr. Schechter, thank you for your answer. I have been reading many of your answers in the previous months, while consulting this forum. You really helped me in the understanding of the software. I am sincerely thankful for your help in this case as well. Have a great day

      Comment


      • #4
        An addendum to Clyde's comment. When you use -xtreg- you don't automatically get panel fixed effects. Your first two commands omit "fe" and so the estimator is the so-called "random effects" estimator, which is a generalized least squares estimator that is defined whether you truly have an unobserved effect or not. It's only when you use -fe- are you removing the so-called firm fixed effects. The first two commands do not fully eliminate the firm effects.

        Comment


        • #5
          Yes, Jeff Wooldridge is correct. I meant to say that when you use -xtreg, fe- you automatically get panel fixed effects. But -xtreg- by itself defaults to the random effects estimator.

          Comment


          • #6
            Thank you both!

            Comment

            Working...
            X