Announcement

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

  • Query in Breusch-Pagan test for panel data

    Hello everyone, I am new to this forum.
    I would like to test my panel data model for Heterskedasticity and so would like to run a Breusch-Pagan test using the xttest2 command. However, whenever I try to run the command, I get the Error: "too few common observations across panel. no observations". I would like to know how I can fix this issue so I can run the xttest2 or I would like to know how I can maually run a test for heteroskedasticity in panel data as this is for my thesis and I have to show the tests. Any input would be greatly appreciated.
    Last edited by Sudharshan Srikkanth; 08 May 2022, 17:49.

  • #2
    Sudharshan:
    the first issue to investigate is the evidence of a panel-wise effect in your dataset.
    If you're using default standard errors, what above is proved by the statistical significance reached by the F-statistic just below your -xtreg,fe- outcome table.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Sudharshan:
      the first issue to investigate is the evidence of a panel-wise effect in your dataset.
      If you're using default standard errors, what above is proved by the statistical significance reached by the F-statistic just below your -xtreg,fe- outcome table.
      Hello Carlo,
      Thank you for your response. In the outcome table, the F statistic is significant at the 1% level with a statistic of 125.77. But I don't understand how this helps me solve my issue. Any repsonse is greatly appreciated.
      Thanks

      Comment


      • #4
        Sudharshan:
        how many observations per panel are you referring to?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hello Carlo,
          The average observation per group is 25.6, I am checking for a relationship between industry concentration and firm profitability. Thus I have industry data from 1970 to 2021 and I have data relating to 45 industries. I just making a guess here: Is this error occurring because the number of years is greater than the number of groups or something of that nature? Also, if that is the case, am I better off using xtgls instead xtreg fe? Is there a varaiton of the Hausman Test to verify using the xtgls as opposed to other specifications? Aplogies for the barrage of questions and thank you for your response.

          Edit: I would als like to add a request: Please suggest a method that I can test for heteroskedasticity as xttest2 is not working.

          Comment


          • #6
            Sudharshan:
            the error probably occurs because the number of common observations across panels is too low.
            That said, with such a long T dimension, I would cluster the standard errors on panelid, taking at the same time autocorrelation and heteroskedasticity into account.
            If analytic tests do not work, visual inspection can be an easy work-around-
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Sudharshan:
              the error probably occurs because the number of common observations across panels is too low.
              That said, with such a long T dimension, I would cluster the standard errors on panelid, taking at the same time autocorrelation and heteroskedasticity into account.
              If analytic tests do not work, visual inspection can be an easy work-around-
              Thank you for your response. Will running a fixed effects regression with robust standard errors cluster the standard errors on panelid, like you mentioned, while taking autocorrelation and heteroskedasticity into account?

              Comment


              • #8
                Sudharshan:
                correct.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Hello Carlo, thank you for your repsonse.
                  What method would you recommend for visual representation of heteroskedasticity and what command is useful in implementing it?

                  Comment


                  • #10
                    Sudarsham:
                    the following toy-example could be helpful:
                    Code:
                    . use "https://www.stata-press.com/data/r17/nlswork.dta"
                    (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
                    
                    . quietly xtreg ln_wage c.age##c.age, fe
                    
                    
                    . predict fitted, xb
                    
                    
                    . predict epsilon, e
                    
                    
                    . scatter e fitted
                    
                    .
                    Heteroskedasticity is apparent in the graph: just go -vce(cluster idcode)- and do not plot epsilon vs. fitted again, as you will obtain the very same graph.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment

                    Working...
                    X