Announcement

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

  • Durbin-Wu-Hausman and Anderson L-R statistic with robust standard errors

    Dear all,
    I am doing an IV regression with ivreg2.
    To check my results, I am trying to do a Durbin-Wu-Hausman test to test endogeneity.
    Due to the textbook “An Introduction to Modern Econometrics Using Stata” by Christopher F. Baum, there are 3 ways of obtaining the DWH statistic in Stata:
    - using hausman, sigmamore
    - ivreg2, orthog()
    - ivreg, ivendog

    The problem is that this is only possible for conditional homoscedasticity.
    Is there any possibility to get the DWH test statistic for robust standard errors?

    I have a similar problem with the Anderson L-R statistic.
    If I use
    Code:
    ivreg2 …., redundant (z1 z2 …)
    I get the Anderson L-R statistic. But in case I use robust standard errors
    Code:
    ivreg2 …., robust redundant (z1 z2 …)
    I get the Kleibergen-Paap-rk LM statistic as an underidentification test instead of the Anderson L-R statistic.

    I am replicating a paper, Kellenberg (2009): "An empirical investigation of the pollution haven haypothesis with strategic environmental and trade policy" with my own data set. Kellenberg also uses robust standard errors at the same time as the Anderson L-R statistic and the DWH statistic.
    Is there any possibility to get these statistics if I use robust standard errors?

    Thanks,
    Teresa


  • #2
    Could you please reproduce here all the instructions you have issued. For instance, I don't see what redundant has to do in the instruction above

    Also,the help for ivreg2 says clearly:
    When the i.i.d. assumption is dropped and ivreg2 reports heteroskedastic, AC, HAC or cluster-robust statistics, the Anderson LM and Cragg-Donald Wald statistics are no longer valid.
    In these cases, ivreg2 reports the LM and Wald versions of the Kleibergen-Paap (2006) rk statistic, also distributed as chi-squared with (L1-K1+1) degrees of freedom.

    Comment


    • #3
      Just to add to Eric's comment: when you include the robust option, for example, ivreg2 will report not only heteroskedastic-robust SEs, but also a heteroskedastic-robust overidentification test, a heteroskedastic-robust endogeneity test, a heteroskedastic-robust test for redundant instruments, etc. If you want un-robust test statistics, you need to omit the robust option, and everything ivreg2 reports will be un-robust.

      Comment


      • #4
        OK, so I will use the Kleiberger-Paap-rk-LM statistic to test for underidentifiaction and the Kleiberger-Paap-rk-Wald statistic for my weak identification test.


        But I still have a problem with the Durbin-Wu-Hausman statisic.

        First, I tried to do the DWH test in case of homoscedasticity by using the othog option
        But I get the error message that “Collinearity/identification problems in eqn. excl. suspect orthog. conditions: C statistic not calculated for -orthog- option”
        If I use
        Code:
        ivreg2 lnGermanFDIs lnTariffRate lnIPRP lnCapitalLaborRatios lnInfrastructureIndex lnQualityofPublicSchools lnOrganizedCrimeIndex lnLawmakinginstitutionquality lnDistancekm Commonlanguage i.Country i.Year i.Industry (lnGDP lnEnvPolicyIndex = Tractorsagriculturalworker Landagriculturalworker RegionalCapitalLaborRatio RegionalOrganizedCrimeNew RegionalpublicschoolqualityNew RegionalinfrastructurequalityNew RegionalLandWorker RegionalTractorsWorker), orthog(Tractorsagriculturalworker Landagriculturalworker RegionalCapitalLaborRatio RegionalOrganizedCrimeNew RegionalpublicschoolqualityNew RegionalinfrastructurequalityNew RegionalLandWorker RegionalTractorsWorker)
        estimate store IV
        xi: reg lnGermanFDIs lnGDP lnEnvPolicyIndex lnTariffRate lnIPRP lnCapitalLaborRatios lnInfrastructureIndex lnQualityofPublicSchools lnOrganizedCrimeIndex lnLawmakinginstitutionquality lnDistancekm Commonlanguage i.Country i.Year i.Industry
        estimate store OLS
        hausman IV OLS, constant sigmamore
        I get a negative value chi2 with the message “chi2<0 ==> model fitted on these data fails to meet the asymptotic assumptions of the Hausman test;see suest for a generalized test”
        Does this mean that I can’t calculate the DWH statistic because my data is not appropriate?


        Second: is there any equivalent statistic to the DWH statistic but for heteroscedasticity, so that I can check endogeneity of my instruments? I can't find any with the help option.

        Thanks!

        Comment


        • #5
          On your second question: you have a number of choices, but the easiest is to use the endog(.) option of ivreg2. This will give you a robust version of the DWH statistic (with the robustness depending on the VCE options you use with ivreg2). In your case that just means endog(lnGDP lnEnvPolicyIndex). The ivreg2 help file has a discussion of this option.

          On your first question: the negative Hausman stat might be the result of using two estimations that are incompatible (you might be getting different definitions of your factor variables). Try using ivreg2 (or ivregress) for both the IV and OLS estimation.

          Comment


          • #6
            I already tried this command, but I think I am doing it wrong, because there is no change in the output compared to the case without endog(.)

            Code:
            ivreg2 lnGermanFDIs lnTariffRate lnIPRP lnCapitalLaborRatios lnInfrastructureIndex lnQualityofPublicSchools lnOrganizedCrimeIndex lnLawmakinginstitutionquality lnDistancekm Commonlanguage i.Country i.Year i.Industry (lnGDP lnEnvPolicyIndex = Tractorsagriculturalworker Landagriculturalworker RegionalCapitalLaborRatio RegionalOrganizedCrimeNew RegionalpublicschoolqualityNew RegionalinfrastructurequalityNew RegionalLandWorker RegionalTractorsWorker), robust endog(lnGDP lnEnvPolicyIndex)

            Comment


            • #7
              Can you show us the output?

              Comment


              • #8
                The output for
                Code:
                ivreg2 lnGermanFDIs lnTariffRate lnIPRP lnCapitalLaborRatios lnInfrastructureIndex lnQualityofPublicSchools lnOrganizedCrimeIndex lnLawmakinginstitutionquality lnDistancekm Commonlanguage i.Country i.Year i.Industry (lnGDP lnEnvPolicyIndex = Tractorsagriculturalworker Landagriculturalworker RegionalCapitalLaborRatio RegionalOrganizedCrimeNew RegionalpublicschoolqualityNew RegionalinfrastructurequalityNew RegionalLandWorker RegionalTractorsWorker), robust endog(lnGDP lnEnvPolicyIndex)

                Click image for larger version

Name:	Unbenannt.png
Views:	2
Size:	137.3 KB
ID:	1306671

                Attached Files

                Comment


                • #9
                  Very odd ... I just tried running something with the same structure and the endog(.) option works fine. I suspect there is something that is causing a recursive call to ivreg2(.) to fail and ivreg2 is not reporting the problem. Can you try one or more of the following? (1) Estimate as above but put "version 10:" in front, i.e., version 10: ivreg2 lnGermanFDIs.... This will get an earlier version of ivreg2 to estimate and report, and it may not have the problem or may report an informative error. (2) Send me the dataset by email and I will try to replicate the problem and fix it.

                  Comment


                  • #10
                    I tried version 10: ivreg2 lnGermanFDIs... and I get the error message: "factor variables not allowed r(101);"
                    If I get it right, a factor variable is a categorical variable that is that the variable has a fixed number of values. The only candidate in my regression is therefore Commonlanguage as it is a dummy variabletaking the values 0 or 1?

                    Comment


                    • #11
                      That's not it ... sorry, my fault. The earlier version of ivreg2 that you ran didn't support factor variables. Country, year and industry are all factor variables that use the "i." prefix. You should use the "xi:" prefix as well, i.e., version 10: xi: ivreg2 .... Or send me the data so I can replicate the bug.

                      Comment


                      • #12
                        I think it worked now

                        Code:
                        version 10: xi: ivreg2 lnGermanFDIs lnTariffRate lnIPRP lnCapitalLaborRatios lnInfrastructureIndex lnQualityofPublicSchools lnOrganizedCrimeIndex lnLawmakinginstitutionquality lnDistancekm Commonlanguage i.Country i.Year i.Industry (lnGDP lnEnvPolicyIndex = Tractorsagriculturalworker Landagriculturalworker RegionalCapitalLaborRatio RegionalOrganizedCrimeNew RegionalpublicschoolqualityNew RegionalinfrastructurequalityNew RegionalLandWorker RegionalTractorsWorker), robust endog(lnGDP lnEnvPolicyIndex)
                        My results look like this:

                        Click image for larger version

Name:	Unbenannt.png
Views:	1
Size:	46.5 KB
ID:	1306714


                        Is the interpretation correct like this?
                        H0: regressors are endogenous
                        As I have a high p-value (p=0.9307>0.05), I can not reject the H0 at a 95% level and therefore my regressors are endogenous.

                        Comment


                        • #13
                          No, it's the other way around. H0: regressors are exogenous, so the small test stat and large p-value suggest that you can treat them as exogenous. Of course, that comes with all the usual caveats, e.g., in your estimation the J stat is a bit large and the instruments are weak.

                          FYI you should get exactly the same test stat if you estimate the same equation using OLS (treating all the regressors as exogenous) and perform a test of exogeneity using the orthog(.) option:

                          Code:
                          version 10: xi: ivreg2 lnGermanFDIs lnTariffRate lnIPRP lnCapitalLaborRatios lnInfrastructureIndex lnQualityofPublicSchools lnOrganizedCrimeIndex lnLawmakinginstitutionquality lnDistancekm Commonlanguage i.Country i.Year i.Industry lnGDP lnEnvPolicyIndex  ( = Tractorsagriculturalworker Landagriculturalworker RegionalCapitalLaborRatio RegionalOrganizedCrimeNew RegionalpublicschoolqualityNew RegionalinfrastructurequalityNew RegionalLandWorker RegionalTractorsWorker), robust orthog(lnGDP lnEnvPolicyIndex)
                          The robust version of DWH in this case is a GMM distance test which is based on the difference between two J stats. In the estimation you did, you treat the 2 variables as endogenous and the endog(.) test stat is the difference between the J and the J from the estimation treating them as exogenous. In the estimation above, the 2 variables are treated as exogenous and the orthog(.) test stat is the difference between the J and the J from the estimation treating them as endogenous.

                          Is it possible for you to email your dataset to me? I am keen to fix the the bug in the newest version of ivreg2 that causes it not to report the endogeneity test stat.

                          Comment


                          • #14
                            Actually, before that, can you check that you have the latest ivreg2 installed? From within Stata, type which ivreg2, all. You should have version 4.1.08.

                            Comment


                            • #15
                              I use version 4.1.07
                              I tried to install the newest version by using ssc install ivreg2, but I get the follwing error message:

                              the following files already exist and are different:
                              c:\ado\plus\i\ivreg2.ado
                              c:\ado\plus\i\ivreg2.sthlp
                              c:\ado\plus\l\livreg2.mlib
                              no files installed or copied
                              (no action taken)
                              r(602);
                              Is there another possibility to update my ivreg2 version?

                              Comment

                              Working...
                              X