Dear Statalist,
I am new to the Forum, and I have a question about the user-written xtoverid command regarding its potential function as a clustered-SE -applicable stand-in for the Hausman Test. Given my lack of experience with posting to the Forum, please let me know if I have misspecified my query in any way. While I have seen somewhat similar posts to this one, I have not seen anyone explicitly lay out how one runs the xtoverid command and interprets its output.
I am a postgraduate political science student, working on a project that involves modeling the predicted share of the vote (%) for certain types of parties at given national elections. Each observation in my data is observed as a given election (which is nested within 22 countries (listed below as the categorical variable FE as this is functioning as the fixed-effect dummy) over 65 years, with the mean number of observations/elections per country being 18 - though the dataset is unbalanced in this respect). As I believe that there are strong reasons to suspect country-correlated errors, I have specified for standard errors to be clustered at the country-level. This latter point makes a Hausman test for the potential applicability of random effects (the most efficient model) unavailable to me. Based on some of the previous posts on this forum, I believe that my best option may be to use the user-written xtoverid command; however, when it comes to actually running this command, I am somewhat confused about the procedure.
To run a Hausman test for the applicability of random effects without standard errors, I would simply run the random- and fixed-effects regression and then test between them. E.g.
xtreg DV IV1 c.IV2##c.IV3 i.IV4, fe (note: I have substituted actual variable names for DV (DepVar) and IV '(IndepVar) for ease of interpretation, the command is otherwise the same).
estimates store fe
xtreg DV IV1 c.IV2##c.IV3 i.IV4, re
estimates store re
hausman fe re (and if the resulting chi-squared test shows a statistically sig. difference, I would know that the differences are large enough to make RE an inappropriate choice, and stick to FE).
However, when it comes to the procedure for xtoverid, I am a little confused. Simply replicating the approach above (substituting xtoverid for hausman) did not work.
I then (after generating my interaction term (now 'IV5') and categorical variable dummies (now IV4a-v) manually, as the xtoverid command seems not to work with the automated approach above) tried just testing the RE model:
xtreg DV IV1 IV2 IV3 IV5 IV4a IV4b IV4c ..., re vce (cluster FE) (note: one of the IV4 categorical dummies is omitted as the reference category)
xtoverid
The resulting output was:
Test of overidentifying restrictions: fixed vs random effects
Cross-section time-series model: xtreg re robust cluster(FEcountry)
Sargan-Hansen statistic 94.004 Chi-sq(18) P-value = 0.0000
Interpreting the above test as I would a Hausman, this suggests to me that the RE model is not an appropriate model (given the Chi-squared test's small p-value). However, when I run a normal Hausman test on the above data (same data and equation) without clustered SEs (back to comparing between-effects and fixed-effects as I described above), the test is nowhere near significance (in fact, it is exactly 1.00!):
Test: Ho: difference in coefficients not systematic
chi2(18) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 1.18
Prob>chi2 = 1.0000
Have I got the wrong end of the stick? Is it purely the clustering of standard errors that is causing the difference, or have I mis-specified/ misinterpreted the xtoverid command? I have had a look at the section on the command here (http://fmwww.bc.edu/repec/bocode/x/xtoverid.html), but I could not find a simple answer to this question.
Best wishes,
Zack Grant
I am new to the Forum, and I have a question about the user-written xtoverid command regarding its potential function as a clustered-SE -applicable stand-in for the Hausman Test. Given my lack of experience with posting to the Forum, please let me know if I have misspecified my query in any way. While I have seen somewhat similar posts to this one, I have not seen anyone explicitly lay out how one runs the xtoverid command and interprets its output.
I am a postgraduate political science student, working on a project that involves modeling the predicted share of the vote (%) for certain types of parties at given national elections. Each observation in my data is observed as a given election (which is nested within 22 countries (listed below as the categorical variable FE as this is functioning as the fixed-effect dummy) over 65 years, with the mean number of observations/elections per country being 18 - though the dataset is unbalanced in this respect). As I believe that there are strong reasons to suspect country-correlated errors, I have specified for standard errors to be clustered at the country-level. This latter point makes a Hausman test for the potential applicability of random effects (the most efficient model) unavailable to me. Based on some of the previous posts on this forum, I believe that my best option may be to use the user-written xtoverid command; however, when it comes to actually running this command, I am somewhat confused about the procedure.
To run a Hausman test for the applicability of random effects without standard errors, I would simply run the random- and fixed-effects regression and then test between them. E.g.
xtreg DV IV1 c.IV2##c.IV3 i.IV4, fe (note: I have substituted actual variable names for DV (DepVar) and IV '(IndepVar) for ease of interpretation, the command is otherwise the same).
estimates store fe
xtreg DV IV1 c.IV2##c.IV3 i.IV4, re
estimates store re
hausman fe re (and if the resulting chi-squared test shows a statistically sig. difference, I would know that the differences are large enough to make RE an inappropriate choice, and stick to FE).
However, when it comes to the procedure for xtoverid, I am a little confused. Simply replicating the approach above (substituting xtoverid for hausman) did not work.
I then (after generating my interaction term (now 'IV5') and categorical variable dummies (now IV4a-v) manually, as the xtoverid command seems not to work with the automated approach above) tried just testing the RE model:
xtreg DV IV1 IV2 IV3 IV5 IV4a IV4b IV4c ..., re vce (cluster FE) (note: one of the IV4 categorical dummies is omitted as the reference category)
xtoverid
The resulting output was:
Test of overidentifying restrictions: fixed vs random effects
Cross-section time-series model: xtreg re robust cluster(FEcountry)
Sargan-Hansen statistic 94.004 Chi-sq(18) P-value = 0.0000
Interpreting the above test as I would a Hausman, this suggests to me that the RE model is not an appropriate model (given the Chi-squared test's small p-value). However, when I run a normal Hausman test on the above data (same data and equation) without clustered SEs (back to comparing between-effects and fixed-effects as I described above), the test is nowhere near significance (in fact, it is exactly 1.00!):
Test: Ho: difference in coefficients not systematic
chi2(18) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 1.18
Prob>chi2 = 1.0000
Have I got the wrong end of the stick? Is it purely the clustering of standard errors that is causing the difference, or have I mis-specified/ misinterpreted the xtoverid command? I have had a look at the section on the command here (http://fmwww.bc.edu/repec/bocode/x/xtoverid.html), but I could not find a simple answer to this question.
Best wishes,
Zack Grant