Announcement

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

  • Individual unit effect in xtregar

    Hello Statalist,
    I am running a panel data fixed effect regression. The N=620, t=10. Given the autocorrelation in error term and smaller t, I decided to use xtregar. In addition, I also want to know individual unit effect, can I create dummy variables for individual unit and include them into the model, just like how least square dummy variable model works in fixed effect model?
    Thank you very much.

  • #2
    Well, you can, if you want, but Stata will omit them anyway. You say you are doing a fixed effects regression with -xtregar-, so, presumably, -xtregar, fe-. So the individual unit effects are already part of the model, and if you try to add "dummy" variables for them, they will just be collinear with those fixed effects and will be dropped.

    Comment


    • #3
      Hello Clyde,
      Thank you for the prompt reply. Actually, the way I include the dummy variable to capture individual effect follows the logic of Least Square Dummy Variable (LSDV) model. Instead of having -xtregar, fe-, I had xtregar, y x1 x2 i. city unit. N-1 dummy variables were included to the model, because the omitted one is treated as reference group.

      I supposed conducting it in this way I should have the same coefficient for X1 and X2 as it in -xtregar, fe-, Just like having same coefficients for X 1 and X2 when conducting -xtreg, fe- vs. LSDV. However, I got different coefficients. Could you please help me figure out why?

      Thanks

      Comment


      • #4
        What you did is not equivalent to -xtregar, fe-. If you didn't specify the -fe- option, then, by default, you got the random effects model. By also including those indicator (dummy) variables, you were representing the units twice: once in the (implicit) random intercepts and again explicitly as indicators. While that doesn't produce the kind of collinearity that leads to omission of the indicator variables, it does mean that your model has the units represented twice, and consequently it's really a gibberish model.

        As far as I know, there is no way to do what you want in Stata. -regress y x1 x2 i.city_unit, vce(auto_regressive)- is what you seem to want--but -regress- does not support an autoregressive VCE estimator, and -xtregar- does not come without either fixed or random intercepts built in.

        Comment


        • #5
          Thank you very much, Clyde. I did not realize that simply including dummy variables without -fe- means representing the units twice. This answered my question why I got different coefficient values.
          I have another question: currently, the way I take "autoregressive" term into consideration is just to add a lagged dependent variable -xtreg y(t) y(t-1) X1 X2 Dummy 2 Dummy 3...DummyX - Dummy variable indicates individual effects. This is the only way that I can think of getting individual effect as well as considering autoregressive term. However, according to other posts, if I have smaller t, adding a lagged variable may not be a good choice. But this is the only idea in my mind. Do you have any suggestions?

          Many thanks

          Comment


          • #6
            One more question: Can I do -predict, u- to predict individual effect after -xtregar, fe-?
            Much appreciated

            Comment


            • #7
              I don't deal with this kind of problem very often. My understanding is that what you propose is problematic, but I can't give you an authoritative answer.

              There are other Forum members who know about these things, and I hope one of them will pick up the thread.

              Comment


              • #8
                Ruowen: With N = 620, T = 10 I would just use

                Code:
                xtreg, y x1 ... xK i.year, fe vce(cluster id)
                The only reason to use something else is for efficiency gains, but xtregar will not compute robust standard errors, and so those gains might be illusory. If the standard errors are acceptably small using the above command then there is no reason to move on.

                Clyde is correct to be suspicious about putting in 650 dummy variables when using xtregar, re: We don't know the statistical properties but I suspect they are not good (incidental parameters problem). If you use xtregar, fe it does properly remove the fixed effects and it then does feasible GLS. But, as I said, the standard errors it computes are almost certainly wrong (because they rely on a very specific AR(1) model and homoskedasticity.)

                At a minimum I would compare xtreg, fe and xtregar, fe. If the parameter estimates differ by a lot, that is a problem.

                Comment


                • #9
                  Thank you both, Jeff and Clyde. I appreciated both of your answers to my question.
                  Maybe let me rephrase my situation. with N-620, t=10, I want to achieve 2 things from conducting fixed effect regression: 1. get individual unit effect; 2. take autocorrelation into account, because my dependent variable is income, which is assumed to be affected by the income in the past year.
                  Jeff, I am currently using the -xtreg-, including a lagged dependent variable, and unit dummy variables. According to the code you suggested, since I am not concerned about -i.year-, should I just drop -i.year- and conduct postestimation such as predict, u, to estimate individual effect?
                  Thank you very much.

                  Comment


                  • #10
                    You definitely should not use xtregar if you have a lagged dependent variable. The estimator is definitely inconsistent. You should use the user-written commands xtdpdgmm or xtabond2. With T = 10 the bias in the usual FE estimator may be small, but you can’t know for sure. But xtregar is not something you should use.
                    Last edited by Jeff Wooldridge; 19 Aug 2020, 05:58.

                    Comment


                    • #11
                      Thank you very much, Jeff. My colleagues and I are currently just using -xtreg- with a lagged dependent variable and individual dummies. You are correct, if I used -xtregar-, I shouldn't include lagged variable. I am just curious, if I use -xtregar, fe-, and-predict, u-, can I get individual fixed effects?
                      Thank you for your time.

                      Comment


                      • #12
                        Just use xtreg, fe and predict u. Serial correlation really has nothing to do with estimating the fixed effects.

                        Comment


                        • #13
                          Thank you very much, Jeff.

                          Comment

                          Working...
                          X