Announcement

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

  • Should i use cluster robust standard errors (clustered at individual level) when using a fixed effects regression on microdata?

    Hello
    I'm using a fixed effects regression on microdata. The microdata is a 1% random sample of the Danish population in the years 1980-2010. Should i use cluster robust standard errors in this situation, or the default standard errors?
    Thanks

  • #2
    Carl, if your data is an individual-level panel data, then I would say yes. But if it's a pooled cross-sectional data (like random samples from multiple waves of census), there is no such "individual level" for clustering.

    Comment


    • #3
      Carl:
      as usual, it depends.
      Is your dataset cross-sectional or panel?
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        When regular and robust standard errors differ by a lot, that usually means something is wrong. So feel free to test and compare. More infos: https://gking.harvard.edu/publicatio...hey-do-not-fix
        Best wishes

        (Stata 16.1 MP)

        Comment


        • #5
          Sorry, i should have been clear. It is panel data, and individuals are followed until they die. What is the reason for using cluster robust standard errors in panel data?

          Comment


          • #6
            Carl, clustering SE at the individual level makes estimates robust to heteroskedasticity and within-individual serial correlation.

            Comment


            • #7
              Dear participants,

              My dataset look at individual firms Scorechanges (SC) over the years whereby each firm incurred the scorechange somewhere from 2016-2020. Therefore, I have repeated time values in my sample data. I provide an example below.

              Code:
              * Example generated by -dataex-. To install: ssc install dataex
              clear
              Firmid Firm                  Year SC Own Skills  PP   ED
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "            2018  3  5.28  4.73 15.18 11
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              1 "ADVTECH LTD "               .  .     .     .     .  .
              2 "AFRICAN OXYGEN                  "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD " 2017  5  18.7  12.1 16.83 11
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              2 "AFRICAN OXYGEN LTD ORD "    .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"    2016  -3   0 11.66  16.5 0
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              3 "ARCELORMITTAL SA LTD"       .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "  2017  2 17.49  9.02 15.29
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              4 "ARGENT INDUSTRIAL LTD "     .  .     .     .     .  .
              5 "ASPEN PHARMACARE HLDGS."    .  .     .     .     .  .
              5 "ASPEN PHARMACARE HLDGS."    .  .     .     .     .  .
              5 "ASPEN PHARMACARE HLDGS."    .  .     .     .     .  .
              5 "ASPEN PHARMACARE HLDGS."    .  .     .     .     .  .
              end
              I would like to regress Scorechange (SC) on Own Skills PP ED
              Code:
              regress SC Own Skills PP ED
              => No problem, regression results show up. However, as I have individual firms and firms incurring the Scorechange (SC) in different years, I should control for fixed effects with respect to firms and years.

              Code:
               regress SC Own Skills PP ED, fe vce (cluster, firm_id)
              or
              Code:
               regress SC Own Skills PP ED, fe vce (cluster, Year)
              => STATA tells me "must first specify panelvar; use xtset".

              However,
              Code:
               xtset SC year
              Yields in "repeating time values in the sample". How should I correctly state my panel data so that I can run the regression with fixed effects?

              Thank you
              Last edited by Raymond Portocarero; 10 Nov 2021, 05:30.

              Comment


              • #8
                Originally posted by Carlo Lazzaro View Post
                Carl:
                as usual, it depends.
                Is your dataset cross-sectional or panel?
                It is panel data. So what do you recommend?

                Comment


                • #9
                  Carl:
                  Fei and Felix already replied positively.
                  If you detect heteroskedasticity and/or autocorrelation (one of them, at least, is frequent with panel dataset), go -robust- or -vce(cluster panelid)- (unlike -regress-, both option do the very same job under -xtreg-).
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment

                  Working...
                  X