Announcement

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

  • Problem in Testing for Autocorrelation in a Panel Data

    Hi,
    I have a panel data set of 68 observation.
    The data is for 34 Companies have observations about returns (dependent variable) and SRI score, leverage and total assets (three independent variables) the data is for 2016 and 2017, so the total number of observations is 68.
    I will use Hausmann test to decide whether to apply Fixed Effect or Random Effect model, but first I am trying to use Wooldrdge test for autocorrelation. I followed the paper by Drukker, 2003 (Testing for serial correlation in linear panel-data models) and used the command;
    xtserial
    but I get the error:
    no observations r(2000);
    Could you please tell me what has gone wrong?



  • #2
    Write your variables after writing xtserial i.e
    xtserial y x1 x2 x3

    Comment


    • #3
      When you have only 2 years, neither serial correlation matters, nor you can test for it.

      Just carry on with the rest of your analysis.

      Comment


      • #4
        Thank all for the feedback

        Sattar: I did that already and it is the same outcome

        Joro: I need to cte that for my paper, could you guide me the source?

        Comment


        • #5
          The source is Joro Kolev, Post #3, on https://www.statalist.org/forums/for...n-a-panel-data. :-).

          Otherwise this is an algebraic regression fact. The procedure which the command you use implements is described somewhere in Wooldridge, Jeffrey M. Econometric analysis of cross section and panel data. MIT press, 2010.

          The procedure is:

          1) Take first differences of the data.

          2) Test whether the autoregressive parameter of the residual in the first differenced regression is equal to -0.5. (Because if you start with an iid residual, and you difference it, the autoregressive parameter must be -.5)

          When you take first differences starting from 2 periods, you end up with a cross section. You cannot neither test, nor worry about autocorrelation in cross sectional data.


          Originally posted by Magnus Sinn View Post
          Thank all for the feedback

          Sattar: I did that already and it is the same outcome

          Joro: I need to cte that for my paper, could you guide me the source?

          Comment


          • #6
            Joro: Thanks. I found it in the book and your explanation makes it simple.

            However, I believe this is more oriented to the FD method. Does this apply for Random Effect method as well?

            Comment


            • #7
              Yes Magnus, it does apply to the random effects model as well.

              The standard panel data model is

              Yit = b*Xit + Ai + Eit

              and you want to test whether Eit is iid.

              Whether you treat Ai as a random or fixed, it is a valid procedure to eliminate Ai with some transformation, and then to test in the resulting estimation equation for the properties of Eit.

              Originally posted by Magnus Sinn View Post
              Joro: Thanks. I found it in the book and your explanation makes it simple.

              However, I believe this is more oriented to the FD method. Does this apply for Random Effect method as well?

              Comment

              Working...
              X