Hausman test - Theory and generalizations Hausman test is used to compare two estimators which are both consistent under the null hypothesis but one is less efficient than the other. 
During my course of Econometrics, I have found that Hausman test can be used in many different settings and I am a bit confused about that. 
The first time I find it was used to choose between fixed and random effect models when dealing with panel data and it was called simply Hausman test. There was also a kind of generalization, the so-called Mundlak's test.
Now, I am working with instrumental variables and I've found Durbin-Wu-Hausman test that seems to me another generalization of the classical Hausman test, besides the fact that it is used to check for exogeneity of the regressors. 
My question is: is Hausman test a general procedure that can be applied to different frameworks? Which are the differences among those test I mentioned above?
 A: The common setting among all of those cases is that


*

*you have 2 estimators

*one estimator is consistent but less efficient

*the other estimator is more efficient but potentially inconsistent.


For instance, in the typical panel setting
$$y_{it} = \beta x_{it} + c_i + \epsilon_{it}$$
the fixed effects estimator is consistent whether or not $x_{it}$ is correlated with the unobserved fixed effects $c_i$. However, it is less efficient than the random effects estimator though the latter is only consistent when $\text{Corr}(x_{it},c_i)=0$.
Likewise IV is consistent whether or not a potentially endogenous explanatory variable is correlated with the error but it is less efficient than OLS. Ordinary least squares is not consistent though when the explanatory variable correlates with the error term.
The logic behind the Hausman test is that you compare a less efficient but consistent estimator to a more efficient but potentially inconsistent estimator. If the two give you the same results (taking into account the sampling variability of the estimates), one can make the argument that it is preferable to use the more efficient estimator. This is what makes the Hausman test so general but the underlying rationale is always the same.
