Announcement

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

  • Fixed effects and clustering

    1) What is the fundamental difference between fixed effects and clustering?
    2) Can we have a regression with both clustering and fixed effects? Many research papers have shown both of them separately. If they have clustered for id and t, then they do not show controlling for fixed effects and if they control for fixed effects then they do not cluster.
    3) What combinations of clustering or fixed effects can be used in different models (ols, fe, re)?

  • #2
    FE demeans the cross sections (adding dummies or pre-filtering). Clustering is for the standard errors. You can use both at the same time and researchers often do if there are enough clusters (at least 10 or more, though some may say more). You can cluster without fixed effects. With xtreg, I think robust is the same as clustered. If you are doing DiD, then you need many treated clusters, or else use -boottest- post estimation.

    Comment


    • #3
      Pranshu:
      1) if you refer to panel datasets, -fe- (or -re-) and clustering are related to the -u- and the -e- components aof the composite error, respectively;
      2) yes we can, provided that multi-clustering is suppported by the community-contributed module -reghdfe- only (as far as I know, at least);
      3) if you mean one-way clustering, the variable to cluster the standard errors on is the -panelid- (usualy). Conversely, you can cluster on both of -panelid- and -timecar. with -reghdfe-.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Two references:

        Comment


        • #5
          Thanks, George and Carlo

          But for the first point, by fixed effects, I mean firm-fixed, time-fixed, industry-fixed, or country-fixed effects.
          Last edited by Pranshu Tripathi; 16 Nov 2022, 11:42. Reason: To rephrase the question

          Comment


          • #6
            Thanks, Hemanshu.

            Comment


            • #7
              Pranshu:
              if you go -fe-, some of them will be wiped out as time-invariant variables.
              Usually, firms belong to the same industry and country.
              If you go, say, -xtreg,fe- and -xtset- you dataset with -firm- as -panelid-, provided that firms do not jump from one industry (or a country) to another during the time horizon your panel dataset stretches over, you're not expected to get any coefficient for industry and country.
              Things are expected to be different if you go -re-, with the proviso that, while -fe- is consistent (but inefficient) even though -re- is the way to go, -re- is inconsistent (read: produces unreliable estimates) if -fe- is the way to go.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                You are right. When I am running the fe regression with the industry effect, industry dummies are omitted.
                What about the same in random and ols models?

                Comment


                • #9
                  Pranshu:
                  the -fe- estimator demeans the variables. Therefore, as the mean of a constant equals the constant itself, its coefficient will be omitted.
                  Since OLS and -xtreg,re- apply different aporoaches, they give back the coefficients for time-invariant predictors, too, provided that no other causes of perfect collinearity exist.
                  Last edited by Carlo Lazzaro; 16 Nov 2022, 16:01.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    Thanks, Carlos.

                    Comment

                    Working...
                    X