Announcement

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

  • xtreg i.year

    I have a question regarding my xtreg model. I am uncertain whether I should include yearly fixed effects or not. I am already using fixed effects at the community level. The following code suggests that I should include yearly fixed effects:

    xtreg var1 var2 i.year, fe robust
    testparm i.year

    However, the RESET test indicates a misspecification as soon as I include yearly fixed effects. Without yearly fixed effects, no misspecification is apparent.

    xtreg var1 var2 i.year, fe robust
    predict fit, xb
    gen fit2=fit^2
    xtreg var1 var2 i.year fit2, fe robust
    test fit2=0

    Does it make sense to use yearly fixed effects or not?
    Many thanks!

  • #2
    John:
    the most likely reason for the issue you're facing is due to a very small number of predictors in your regression equation.
    I do not think that -i.year- is the culprit here.
    In addition, you should add the -fitted- values too in your augmented regression, that can also boil down to:
    Code:
    xtreg depvar fitted sq_fitted, fe robust
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for your response. Indeed, I have multiple predictor variables; my representation was a bit incorrect.

      xtreg yvar $xlist i.year, fe robust

      I have a gravity model and compare a linear model with a logarithmized probability as the dependent variable with a Poisson model. I'm using the RESET test code as presented in "The Log of Gravity". For the Poisson model, there is no misspecification, neither with nor without i.year. Thus, I wonder why testing for yearly fixed effects using testparm points to the inclusion of yearly fixed effects, while incorporating yearly fixed effects in the RESET test indicates misspecification.

      Comment


      • #4
        As I’ve said often before, RESET has severe limitations as a general test of misspecification. It’s not generally good at detecting omitted variables. It can’t distinguish between omitted variables and neglected nonlinearity. In some cases its power for detecting omitted variables equals its size.

        in the case of time dummies, if you can see they’re significant then you should include them. As a rule, time dummies are the default.

        Comment


        • #5
          John:
          you should have specified in your first post that you were dealing with a gravity model.
          See Joao Santos Silva ' s posts on this topic.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Many thanks. I have another question concerning this topic:
            I am analyzing a gravity model with the number of commuters between bilateral pairs of municipalities. For this, I have conducted the RESET test for the fixed-effects Poisson model (independent variable being the number of commuters).

            xtpoisson yvar i.year $xlist, fe robust
            predict fit, xb
            gen fit2=fit^2
            xtpoisson yvar i.year $xlist fit2, fe robust
            test fit2=0

            My question is, can I perform the RESET test for a linear fixed-effects model (independent variable is the log commuting probability) in a similar manner?

            xtreg yvar i.year $xlist, fe robust
            predict fit, xb
            gen fit2=fit^2
            xtreg yvar i.year $xlist fit2, fe robust
            test fit2=0

            Comment

            Working...
            X