Hi,
I am using the xtivreg2 command to estimate a FE-IV model. I would like to ask two questions which regard the endogeneity test, and the versions of it, produced by xtivreg2.
1. If I understand it correctly, if the "robust" and "cluster" options are specified in the xtivreg2 command, xtivreg2 calculates a version of the endogneiety test that is robust to heteroskedasticity and serial correlation within panel groups. I would like to see the exact formula used to calculate the endogeneity test. In the documentation file for "ivregress postestimation" (http://www.stata.com/manuals13/rivre...estimation.pdf) page 15 gives some information. From this information, I suspect the statistic in question is Wooldridge’s (1995) score test because the documentation file states "(...) this test can be made robust to heteroskedasticity, autocorrelation, or clustering by using the appropriate robust VCE (...)". On the other hand, the documentation of ivreg2 does not specify the exact formula used. Which endogeneity test is used here? Where can I find the exact formulas calculating the versions of the test that are robust to heteroskedasticity, robust to serial correlation in the errors within panel groups, and robust to both at the same time?
2. The command I use to obtain the endogeneity test is "xtivreg2 dependent $model, fe endog(varone vartwo) robust cluster(panelid)" which leads to "-endog- option: Endogeneity test of endogenous regressors: 24.977 Chi-sq(2) P-val = 0.0000". I also wanted to check the result produced by the "estat endogenous" command that can be executed after the ivregress command. For this, I first execute "xtdata dependent independent instruments, i(panelid) fe clear" to obtain the differenced data so that I could execute "ivregress 2sls dependent $model, robust cluster(panelid)". Following this, I execute the "estat endogenous" command which leads to "Robust regression F(2,12814) = 12.1324 (p = 0.0000) (Adjusted for 12815 clusters in HHIDPN)". I expected that the endogeneity option of the xtivreg2 command and the output of the estat endogenous command both use the same endogeneity test and hence lead to the same test value. Apperantly they use different statistics, or that my approach of differncing the data and using the ivregress command incorrect, although I cannot really think of a reason why it would be incorrect because I obtain the very same coefficient estimates in xtivreg2 and in ivregress after differencing. From the documentation of "estat endogenous", the formula used to calculate the endogeneity test, that is robust to heterskedasticity and serial correlation within panel groups, is not clear to me. Is there a Stata reference that clearly states the statistics and formulas used by estat endogenous?
Tunga
I am using the xtivreg2 command to estimate a FE-IV model. I would like to ask two questions which regard the endogeneity test, and the versions of it, produced by xtivreg2.
1. If I understand it correctly, if the "robust" and "cluster" options are specified in the xtivreg2 command, xtivreg2 calculates a version of the endogneiety test that is robust to heteroskedasticity and serial correlation within panel groups. I would like to see the exact formula used to calculate the endogeneity test. In the documentation file for "ivregress postestimation" (http://www.stata.com/manuals13/rivre...estimation.pdf) page 15 gives some information. From this information, I suspect the statistic in question is Wooldridge’s (1995) score test because the documentation file states "(...) this test can be made robust to heteroskedasticity, autocorrelation, or clustering by using the appropriate robust VCE (...)". On the other hand, the documentation of ivreg2 does not specify the exact formula used. Which endogeneity test is used here? Where can I find the exact formulas calculating the versions of the test that are robust to heteroskedasticity, robust to serial correlation in the errors within panel groups, and robust to both at the same time?
2. The command I use to obtain the endogeneity test is "xtivreg2 dependent $model, fe endog(varone vartwo) robust cluster(panelid)" which leads to "-endog- option: Endogeneity test of endogenous regressors: 24.977 Chi-sq(2) P-val = 0.0000". I also wanted to check the result produced by the "estat endogenous" command that can be executed after the ivregress command. For this, I first execute "xtdata dependent independent instruments, i(panelid) fe clear" to obtain the differenced data so that I could execute "ivregress 2sls dependent $model, robust cluster(panelid)". Following this, I execute the "estat endogenous" command which leads to "Robust regression F(2,12814) = 12.1324 (p = 0.0000) (Adjusted for 12815 clusters in HHIDPN)". I expected that the endogeneity option of the xtivreg2 command and the output of the estat endogenous command both use the same endogeneity test and hence lead to the same test value. Apperantly they use different statistics, or that my approach of differncing the data and using the ivregress command incorrect, although I cannot really think of a reason why it would be incorrect because I obtain the very same coefficient estimates in xtivreg2 and in ivregress after differencing. From the documentation of "estat endogenous", the formula used to calculate the endogeneity test, that is robust to heterskedasticity and serial correlation within panel groups, is not clear to me. Is there a Stata reference that clearly states the statistics and formulas used by estat endogenous?
Tunga
Comment