Announcement

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

  • Heteroscedasticity and autocorrelation in OLS model

    Hello Stata community!
    Well, my OLS panel data suffer from Heteroscedasticity and autocorrelation. To the best of my knowledge ( I might be wrong), to correct only for Heteroscedasticity we can add the vce(robust) command. My question is how to correct for both Heteroscedasticity and autocorrelation using OLS (regress) and fixed/random effect (xtreg).

  • #2
    vce(cluster "id_variable"), if you have enough N in your NxT in your panel. How many you got?

    Comment


    • #3
      my study covers 39 companies for 3 years

      Comment


      • #4
        good to go.

        add cluster("your_company_id_variable") to get clustered SE.

        Comment


        • #5
          thank you so much @George Ford

          Comment


          • #6
            That is not very many clusters, I would use cluster bootstrap with the user written command boottest

            Comment


            • #7
              Yeah, you could boottest it for good measure. Easy enough to do and really fast, but the results will be nearly identical with 39 companies. There's a lot of ideas about how many clusters is enough (some saying 10, others saying 50, some say more) and better to be safe than sorry.

              Comment


              • #8
                42, hitchhiker's guide to the galaxy!

                Comment


                • #9
                  Nermine:
                  an useful reference on clustering standard errors is Cameron_Miller_JHR_2015_February.pdf (ucdavis.edu)
                  Kind regards,
                  Carlo
                  (StataNow 18.5)

                  Comment


                  • #10
                    Actually, Max, in this case the magic number is 39. 39 is just right.

                    Comment

                    Working...
                    X