Announcement

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

  • Fixed Effect Regression with year and firm fixed effects

    Hi,

    i have a question about my regression, I found some threads about it but still some questionmarks left:

    I like to have a fixed effect regression with year and firm-fixed effects but unfortunately I don't get it until now.

    Code:
    xtreg f. em_intensity environmental_metric firm_size roa leverage firm_value cap_intensity sales_growth_win ceo_duality  board_size board_independence prc_busy3 i.year, fe vce(robust)
    Currently as I understand it correctly I only have year-fixed effets included and if I want to have year and firm-fixed effects I need to include i.firm_code or does it belong to the brackets?

    I used xtset upfront with the firm_code and year
    Code:
    xtset firm_code_num year
    Many thanks!



  • #2
    Albert:
    1) Stata will throw a warning message upon your trying to include -firm_code_num-, as this is your -panelvar- (already included in -xtset-);
    2) including -i.year- is correct and highly advisable;
    3) you may want to take a look at the community-contributed module -reghdfe- if you want to retrieve both fixed effects (i.e., firm and year).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Albert:
      1) Stata will throw a warning message upon your trying to include -firm_code_num-, as this is your -panelvar- (already included in -xtset-);
      2) including -i.year- is correct and highly advisable;
      3) you may want to take a look at the community-contributed module -reghdfe- if you want to retrieve both fixed effects (i.e., firm and year).
      Thanks for your answer!
      Yes the output says that my Group variable is firm_code_num so do I already have the firm fixed effects included?
      I'm a bit lost how to interpret it, sorry.

      Comment


      • #4
        In the regression you show, you have firm and year fixed-effects included.

        Comment


        • #5
          Albert:
          I do share Maxence's helpful interpretation.
          I'm not clear with what you're unclear with, then.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Originally posted by Carlo Lazzaro View Post
            Albert:
            I do share Maxence's helpful interpretation.
            I'm not clear with what you're unclear with, then.
            Thank you both!
            I try to find information on fixed effects but besides some literature practical examples are rare or I am personally not able to find them for example I am looking for some typical diagnostic test.
            If you have some advice/links would be extremely helpful!
            Thank you very much

            Comment


            • #7
              Albert:
              1) you can find Stata-related example on -xtreg,fe- at its related entry in Stata -pdf manual and https://www.stata.com/bookstore/micr...metrics-stata;
              2) the usual tests include_ heteroskedastcity, autocorrelation (within and across panels), functional specification form of the regressand.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment

              Working...
              X