Announcement

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

  • Panel data and autocorrelation

    Do panel data need autocorrelation?

  • #2
    David:
    welcome to this forum.
    Autocorrelation should be taken into account via cluster-robust standard error (see options -cluster()- and -robust- under -xtreg-).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thankyou Carlo, I'm sorry if what I asked maybe unclear or I don't attached data needed for you to answer my question since I'm literally new here and am still a undergraduate student. Can you please show me where is this "options" in the toolbar? I'm using Stata/SE 13.0. I am also in need of help since my data suffers from heteroscedasticity and autocorrelation, for the hetero my college mates told me to use robust to solve the problem but I can't find any fit solution for the autocorrelation problem because what I found on the internet mostly say that autocorrelation problem is affiliated with time series data. Maybe I'll try to attach my data here (sorry if I do it wrong)

      . reg roa esg size lev logage ind cntry1

      Source | SS df MS Number of obs = 1302
      -------------+------------------------------ F( 6, 1295) = 33.43
      Model | 8000.16012 6 1333.36002 Prob > F = 0.0000
      Residual | 51649.0846 1295 39.883463 R-squared = 0.1341
      -------------+------------------------------ Adj R-squared = 0.1301
      Total | 59649.2447 1301 45.8487661 Root MSE = 6.3153

      ------------------------------------------------------------------------------
      roa | Coef. Std. Err. t P>|t| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      esg | .0317913 .013604 2.34 0.020 .005103 .0584796
      size | -.295232 .0745342 -3.96 0.000 -.4414529 -.149011
      lev | -.1075847 .0107117 -10.04 0.000 -.1285989 -.0865705
      logage | -.758627 .6035218 -1.26 0.209 -1.942615 .4253606
      ind | -3.250453 .4309578 -7.54 0.000 -4.095905 -2.405001
      cntry1 | 1.42577 .6239347 2.29 0.022 .201736 2.649803
      _cons | 13.26432 1.141113 11.62 0.000 11.02569 15.50296
      ------------------------------------------------------------------------------

      . hettest

      Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
      Ho: Constant variance
      Variables: fitted values of roa

      chi2(1) = 198.29
      Prob > chi2 = 0.0000

      . xtserial roa esg size lev logage ind cntry1

      Wooldridge test for autocorrelation in panel data
      H0: no first-order autocorrelation
      F( 1, 270) = 2.515
      Prob > F = 0.1140


      Attached Files

      Comment


      • #4
        David:
        -please do not share attachments (see the FAQ on this and other posting-related topics). By the way, please note that, due to the risk of active contents, nobody on this list would ever download spreadsheets from unknown sources. Use -dataex- instead;
        -please use CODE delimiters
        Code:
        these are CODE delimiters
        to post what you typed and what Stata gave you back;
        -you have an apparent heteroskedasticity issue in your regression model: -robust- option from -regress- will deal with it;
        - being devised for panel data analysis, the community-contributed command -xtserial- (as per FAQ, please note that, whenever you use a non-official Stata command, you should highlight it) does not support -regress-. Use -estat vce, corr-, instead to detect quasi-extreme multicolinearity issues, instead.
        As an aside, I would recommend you to rehearse your knowledge of panel data analysis via any decent (panel data) econometrics textbook. Stata users like https://www.stata.com/bookstore/micr...metrics-stata/.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thanks Carlo Lazzaro for the suggestion, I'll try to execute it asap. I have one more question if you are willing to answer, what is the best command for heteroscedasticity, multicollinearity and autocorrelation for Fixed Effect Model? I just found out that I am supposed to use FE instead of OLS/PLS and I think I ran the test wrong. Thanks!

          Comment


          • #6
            David:
            1) testing for heteroskedasticity: see https://economics.stackexchange.com/...s-time-series;
            2) testing for multicollinearity: see outcome from -estat vce, corr-;
            3) testing for autocorrelation: see the user-written command -xtserial-.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Carlo Lazzaro Thankyou so much carlo and I'm sorry if it's hard for me to understand, hope you still willing to answer my questions in the future.

              Regards.

              Comment


              • #8
                David:
                we're all have been (and, as far as I'm concerned; I often find myself being still a) newbie(s).
                The most prolific contributor to this forum - Nick Cox - once wrote (surely in an English better than mine): "We are all beginners: some of us are only more experienced".
                I find in Nick's sentence the essence of the lifelong learning.
                Due to its muldisciplinary flavour, the Stata forum is a valuable opportunity to learn about Stata and statistics at large.
                Everybody's posts are welcome: the only request is reading and acting on the FAQ.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X