Announcement

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

  • Time Fixed Effect and Period Dummy

    Hi there,


    I want to capture the changes in mean for the dependent variable (y) across different periods. Assume I have 10 years' panel data on 10 companies. I use a dummy variable Y6Y10 to indicate the last 5 years (i.e. year 6 to year 10), so its coefficient will capture the changes in the mean of y in years 6 to 10 relative to years 1 to 5. I also want to include company fixed effect to control for any unobservable changes in company characteristics.

    My question is whether I will be able to include also the year fixed effect to control for unobservable changes in the economic trend while I have already included the period dummy Y6Y10 in the model? Will this cause any potential statistical/econometrical issue? (I have run the model and got statistically significant loadings on both the year dummies and the period dummy.)

    If I consider three control variables x1, x2 and x3, my model will look like:

    regress y x1 x2 x3 Y6Y10 i.year i.company, vce(cluster year)

    Your help will be very much appreciated.


    Regards,
    Georgina





  • #2
    Welcome to the Stata Forum / Statalist,

    Please read the FAQ, particularly the topic about sharing data/command/output.

    That being said, considering you mentioned you'll deal with panel data, there are a few comments: first, you'll need to - xtset -, hence time will be, well, taken in consideration in the model, but you may add a time-period covariate, depending on the aim of the study. Second, instead of - regress - you will need to use - xtreg - considering the DV is continuous.
    Best regards,

    Marcos

    Comment


    • #3
      Georgina:
      as an aside to Marcos' helpful advice, please note:
      - it's rare that pooled OLS (like the one you sketched in your original post) outperforms -xtreg- when it comes to panel data with a continuous regressand (DV);
      - if that were the case, you should cluster your standard errors (SEs) on -panelid-, not -timevar-;
      - as per you description, you're probably have in mind a fixed effect panel data regression (-xtreg, fe-). Please note that if you add -i.panelid- among the predictors, it will be omitted due to collinearity with fixed effect of -panelid- mentioned in -xtset- ing your panel data;
      - however, you should always test whether -fe- or -re- specification fits your data better. You can do it via -hausman- (provided that you use default standard errors) or the user-written programme -xtoverid- (type -search xtoverid- from within Stata to spot and install it) if you invoke non-default SEs in -xtreg-;
      - you can test whether -i.year- is jointly significant via -testparm- after -xtreg-.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Originally posted by Carlo Lazzaro View Post
        Georgina:
        as an aside to Marcos' helpful advice, please note:
        - it's rare that pooled OLS (like the one you sketched in your original post) outperforms -xtreg- when it comes to panel data with a continuous regressand (DV);
        - if that were the case, you should cluster your standard errors (SEs) on -panelid-, not -timevar-;
        - as per you description, you're probably have in mind a fixed effect panel data regression (-xtreg, fe-). Please note that if you add -i.panelid- among the predictors, it will be omitted due to collinearity with fixed effect of -panelid- mentioned in -xtset- ing your panel data;
        - however, you should always test whether -fe- or -re- specification fits your data better. You can do it via -hausman- (provided that you use default standard errors) or the user-written programme -xtoverid- (type -search xtoverid- from within Stata to spot and install it) if you invoke non-default SEs in -xtreg-;
        - you can test whether -i.year- is jointly significant via -testparm- after -xtreg-.
        Carlo, i have similar problem. Can I use the time fixed effect together with the dummy period. My dummy period is covid (0=if 2018-2019 and 1=if 2020-2021). My observations cover 4 years 2018-2021, with panel data. Is it possible to use "xtreg depvar indepvar i.covid i.year, fe cluster(firm)" ? Will the significance of the covid variable decrease due to the use of the time fixed effect (i.year)? Best regard Ahmad

        Comment


        • #5
          Ahmad:
          welcome to this forum.
          Yes, it is possible, but I do expect some collinearity issues with your code.
          That said, as per FAQ, please post what you typed and what Stata gave you back to increase your chances of getting (more) helpful replies. Thanks.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X