Announcement

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

  • xtivreg2 and First Stage Test Results

    Dear Statalist,

    I am using Stata SE Version 12, and researching trade flows. I ran an unclustered xtivreg2 regression with two dependent variables, with about 840,000 observations across 11 years. However, as part of my PhD viva I was advised to cluster the standard errors by importer-exporter pair. Doing that yielded the same coefficients with larger standard errors, as expected .However, what confused me was the significant change in each of the first stage test statistics (Angrist-Pischke F test, Angrist-Pischke χ², Kleibergen-Paap Wald rk F statistic, Kleibergen-Paap rk LM statistic). For example, for one of the variables, the Angrist-Pischke F test went from 3058.37 before clustering to 9.67 after.

    Here are the two regressions run.
    xtivreg2 y1 (endog1 endog2 = IV1 IV2) x1 x2 x3 x4 x5 x6 x7 x8 yeardum *, fe robust
    xtivreg2 y1 (endog1 endog2 = IV1 IV2) x1 x2 x3 x4 x5 x6 x7 x8 yeardum*, fe cluster(pair_num) robust

    Do the calcuations for the various tests use the standard errors? Or is there something I’m overlooking about using xtivreg2 with cluster?
    I would be grateful for any illumination or insight anyone could provide.

    Thank you

  • #2
    Hi Sinead,

    Clustering your standard errors should apply to both stages of the IV regression. So, when Stata calculates the first stage test statistics, it uses clustered standard errors instead of the non-clustered standard errors that you used in your first pass.

    We can use the F-test as an example to illustrate how this will change the first-stage test statistics. To make things as simple as possible, let's take an extreme example and assume you have a simple bivariate regression (reg y x). In this case, the F statistic is actually just the t statistic on your x variable squared! So, if you cluster your variables, as you rightly note, the coefficient itself will not change but the standard error will (generally) get larger. As such, the t statistic will decrease, as will the F statistic, due to the mathematical relationship between the F and t. If you have a multivariate regression, as you do, the qualitative result is identical, although the math doesn't work out so nicely.

    Hope this helps.

    Josh

    Comment


    • #3
      That's right. When xtivreg2 is called with an option that specifies a kind of robust VCV (cluster-robust, heteroskedastic-robust, HAC, etc.), this applies to all the stats reported unless otherwise noted in the output: the main equation, the first-stage equation, tests of under/over/weak identification, etc. FYI an example of "unless otherwise noted" would be the critical values for the Cragg-Donald statistic, which are accompanied by a note that says they are valid only for the i.i.d. case.

      Comment


      • #4
        Thank you both for that - provided a very useful insight; I think I understand why the under/over/weak identification tests change. However, how then does one go about interpreting them in the clustered regression?

        Comment


        • #5
          Since most tests are performed with a test statistic and a critical value, the rule stays the same. If it's greater than the critical value, reject the null, if not, do not reject.

          Comment


          • #6
            The exception is the test for underidentification, where the theory is not fully developed for the non-iid case. Montiel Olea and Pflueger (JBES 2013) discuss a weak identification test for the 1-endogenous-regressor non-iid case (available for Stata from SSC as weakivtest) but as far as I know there isn't any formal test for your 2-endogenous-regressor case.

            BTW, I note you are using Angrist-Pischke first-stage F tests. You might want to consider reporting the Sanderson-Windmeijer F test instead. This is an extension and improvement of the A-P version. S-W F stats are available in the current ivreg2/xtivreg2; references and discussion are in the ivreg2 help file.

            Comment


            • #7
              hello,

              sorry, it might be a stupid question, but I don't understand why I should use the clustered standard error instead of the robust standard error.

              thank you very much!

              Comment

              Working...
              X