# On the Proper Computation of the Hausman Test Statistic in Standard Linear Panel Data Models: Some Clarifications and New Results

Julie Le Gallo, Marc-Alexandre Sénégas

<figure><img src="image_1.png" /></figure>

## To cite this version:

Julie Le Gallo, Marc-Alexandre Sénégas. On the Proper Computation of the Hausman Test Statistic in Standard Linear Panel Data Models: Some Clarifications and New Results. Econometrics, 2023, 11 (4), pp.25. 10.3390/econometrics11040025. [https://doi.org/10.3390/econometrics11040025](https://doi.org/10.3390/econometrics11040025). [hal-04278648](https://HAL.inistre.fr/hal-04278648v1).

HAL Id: hal-04278648

https://hal.science/hal-04278648v1

Submitted on 17 Jun 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>
Article

# On the Proper Computation of the Hausman Test Statistic in Standard Linear Panel Data Models: Some Clarifications and New Results

Julie Le Gallo<sup>1,*,† ID</sup> and Marc-Alexandre Sénégas<sup>2,† ID</sup>

**Abstract:** We provide new analytical results for the implementation of the Hausman specification test statistic in a standard panel data model, comparing the version based on the estimators computed from the untransformed random effects model specification under Feasible Generalized Least Squares and the one computed from the quasi-demeaned model estimated by Ordinary Least Squares. We show that the quasi-demeaned model cannot provide a reliable magnitude when implementing the Hausman test in a finite sample setting, although it is the most common approach used to produce the test statistic in econometric software. The difference between the Hausman statistics computed under the two methods can be substantial and even lead to opposite conclusions for the test of orthogonality between the regressors and the individual-specific effects. Furthermore, this difference remains important even with large cross-sectional dimensions as it mainly depends on the within-between structure of the regressors and on the presence of a significant correlation between the individual effects and the covariates in the data. We propose to supplement the test outcomes that are provided in the main econometric software packages with some metrics to address the issue at hand.

**Keywords:** random effects panel data model; Hausman specification test; quasi-demeaned model

**JEL Classification:** C12; C23

## 1. Introduction

As is well known, the implementation of the Hausman specification test (Hausman 1978) might be affected, in practice and in a finite sample setting, by a non-positive definiteness or (in-) definiteness problem for the variance-covariance matrix corresponding to the difference between the efficient estimator and the consistent estimator<fnref n="1" />. This, in turn, can potentially lead to a negative value of the test statistic, which makes it unreliable for interpreting the test outcome. This problem is usually mentioned in the context of models using instrumental variables (IV) (Baum et al. 2003, pp. 19–22; Staiger and Stock 1997, pp. 567–68) where the Hausman test is performed to assess the endogeneity of the regressors, given a set of instruments. In this case, one solution to ensure a symmetric positive definite (hereafter, SPD) covariance matrix is to use a common and identical estimator for the variance of the (idiosyncratic) error term when confronting the Ordinary Least Squares (OLS) and the IV estimators (Hayashi 2000, pp. 220–33; Baum et al. 2003, pp. 19–22).

Yet, although the issue has been pointed out as a warning by Hausman himself when he addressed the case of a static balanced, panel data model in his seminal presentation of the test (Hausman 1978, footnote 25, p. 1267), it has not been, to the best of our knowledge, further formally examined in this specific framework<fnref n="2" />. This is surprising, as one of the

<figure><img src="image_3.png" /></figure>

check for
updates

**Citation:** Le Gallo, Julie, and Marc-Alexandre Sénégas. 2023. On the Proper Computation of the Hausman Test Statistic in Standard Linear Panel Data Models: Some Clarifications and New Results.

Econometrics 11: 25. https://doi.org/10.3390/econometrics11040025

Academic Editor: Xibin Zhang

Received: 7 June 2023

Revised: 31 October 2023

Accepted: 6 November 2023

Published: 8 November 2023

<figure><img src="image_4.png" /></figure>

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

<footnote n="1">1 Center of Economics and Sociology Applied to Rural Areas, UMR1041, l'Institut Agro Dijon, INRAE, University Bourgogne Franche-Comté, 21000 Dijon, France</footnote>

<footnote n="2">2 Bordeaux School of Economics, UMR CNRS6060, University of Bordeaux, 33000 Bordeaux, France; marc-alexandre.senegas@u-bordeaux.fr</footnote>

<footnote>* Correspondence: julie.le-gallo@institut-agro.fr</footnote>

<footnote>† These authors contributed equally to this work.</footnote>
most widespread applications of the Hausman test is for assessing the relevance of the random (RE) versus fixed effects (FE) specification in a panel data model. From our point of view, this application, however, deserves attention in its own right, and this article aims at filling this gap. Specifically, our contributions are twofold.

We first provide new and detailed analytical results for the implementation of the Hausman test in the case of a static and balanced panel data model with individual effects. In particular, we show that the test statistic is unreliable in a finite sample if the variance of the RE estimator is computed on the basis of the estimation of the quasi-demeaned model (we denote it in what follows QDM)³ rather than the conventional and direct implementation of the Feasible Generalized Least Squares (FGLS) on the RE panel data model. This result directly follows from the way in which standard errors are computed under the QDM approach and which can lead to a positive definiteness problem for the covariance matrix in the Hausman test statistic formula. To establish the unreliability, we perform a systematic analysis of the difference between the Hausman statistics computed under the two approaches as well as of the behavior of the statistic that uses the estimates based on the QDM regression framework. In particular, we show that the latter mainly depends on the within-between structure of the regressors and on the presence of a significant correlation between the individual effects and the covariates in the data⁴.

Second, based on a review of the main existing econometric software programs that deal with panel data models, we show that the vast majority of the related packages in those programs implement, by default, the Hausman test using the unreliable statistic. This leads us to assess different ways to supplement the test outcomes provided by those programs and/or to circumvent the reliability problem potentially raised by the use of the statistic involved.

The outline of the paper is as follows. First, in Section 2, we show how the two versions of the Hausman test statistics can produce diverging results for some well-known textbook examples in the context of panel data models. Then, in Section 3, we formalize the implications of the two approaches for the Hausman statistic and derive new analytical results regarding the comparison of the two versions of the statistic that follows from each of the two approaches. We also revisit textbook examples and provide some simulation results in the one-regressor case. Finally, in Section 4, we detail how the Hausman test is implemented in a variety of econometric software programs dealing with panel data models and discuss, on the basis of this review, some possible ways to implement this test in a reliable and robust manner with this software. The last section concludes.

## 2. Motivation

In this section, we illustrate the extent to which significant differences in the values of the Hausman test statistic may arise depending on the approach adopted to estimate the panel data model parameters and, more particularly, those pertaining to the variance components under the random effects (RE) specification.

### 2.1. Notation

All the case studies considered below are for a standard, linear, static, and balanced panel data model with individual effects (also called the one-way error component-panel data-model). Accordingly, we consider the following relationship:

$$y_{it} = \alpha + X'_{it} \cdot \beta + u_{it} \quad (1)$$

where $i = 1, ..., N$ denotes the cross-section dimension; $t = 1, ..., T$ the time-series dimension; $y_{it}$ the $it$-th observation of the dependent variable; $X'_{it}$ a column vector of the $it$-th observation on $K$ explanatory variables; $\alpha$ an unknown scalar and $\beta$ a $(K \times 1)$ vector of
unknown parameters, both to be estimated⁵. The error term $u_{it}$ is assumed to take the following composite form:

$$u_{it} = \alpha_{i}^{*} + \varepsilon_{it} \qquad (2)$$

where $\alpha_{i}^{*}$ denotes the (unobservable) individual-specific (or individual) effect-also called the individual component of $u_{it}$ and $\varepsilon_{it}$ denotes the idiosyncratic component of $u_{it}$. Furthermore, we assume that $\alpha_{i}^{*}$ and $\varepsilon_{it}$ are independent of each other and that $\alpha_{i}^{*} \sim IID(0, \sigma_{\alpha}^{2})$ and $\varepsilon_{it} \sim IID(0, \sigma_{\varepsilon}^{2})$. It is also assumed that $E[X_{is} \cdot \varepsilon_{it}] = 0$ for all $s = 1, ..., T$.

As is well known, two alternative specifications are usually considered regarding the correlation between the individual effect, $\alpha_{i}^{*}$ and the regressors contained in $X_{it}$. On the one hand, the random-effects (RE) model assumes that this correlation is zero, ensuring that $X_{it}$ is strictly exogenous for $u_{it}$ in (1). On the other hand, the ‘fixed effects’ model allows for a non-zero correlation between the individual effect and the regressors. The Within transformation is then used to obtain an unbiased estimate for $\beta$.

The Hausman specification test (Hausman 1978) is widely used for testing the no-correlation assumption underlying the RE specification. In our setting, the test is based on the asymptotic properties of the RE and Within (or fixed-effects) estimators of $\beta$. Both estimators are consistent under the null hypothesis (of no correlation) while, under the alternative, only the Within estimator is consistent as the RE estimator is (asymptotically) biased. Accordingly, the test statistic is built on a distance measure between the Within and RE estimators. In its implementable version, the statistic writes as:

$$HM_{O}^{j} = (\hat{\beta}_{W} - \hat{\beta}_{RE})' \cdot \{\mathbf{v}\hat{\mathbf{a}}_{R}[\hat{\beta}_{W}] - \mathbf{v}\hat{\mathbf{a}}_{R}[\hat{\beta}_{RE}]\}^{-1} \cdot (\hat{\beta}_{W} - \hat{\beta}_{RE})$$

where $\hat{\beta}_{W}$ and $\mathbf{v}\hat{\mathbf{a}}_{R}[\hat{\beta}_{W}]$ denote the Within (or fixed effects) estimator of $\beta$ and a consistent estimator of its asymptotic covariance matrix, respectively; $\hat{\beta}_{RE}$ and $\mathbf{v}\hat{\mathbf{a}}_{R}[\hat{\beta}_{RE}]$ denote the RE estimator of $\beta$ and a consistent estimator of its asymptotic covariance matrix, respectively. The index $j = 1, 2$ indicates that two approaches can be considered to obtain a consistent estimator of the asymptotic covariance matrix, leading to two versions of the test statistic (see Section 3.3).

## 2.2. Motivating Examples

We reproduce some outcomes of panel model estimations for well-known case study applications taken from main textbooks in the field. In the following tables, Std Err._1 and Std. Err._2 denote the two sets of standard errors for the parameters implied by the use of two different estimators for the covariance matrix of the RE estimator (detailed below). The values of the two related versions of Hausman test statistics are denoted $HM_{O}^{1}$ and $HM_{O}^{2}$. Other variables and parameters are shown in the tables, the definitions and interpretations of which are left for discussion in Section 3 where we further comment on those results.

### 2.2.1. Motivating Example 1: Gasoline

Baltagi (2005) provides an interesting example of an important difference between the two versions of the Hausman test statistic in a study on the determinants of gasoline demand over the period 1960–1978 across 18 OECD countries⁶. The following specification is adopted:

$$\log[\text{Gas}/\text{Car}] = \alpha + \beta_{1} \cdot \log[Y/N] + \beta_{2} \cdot \log[P_{\text{MG}}/P_{\text{GDP}}] + \beta_{3} \cdot \log[\text{Car}/N] + u$$

where Gas/Car is motor gasoline consumption per auto, $Y/N$ is real income per capita, $P_{\text{MG}}/P_{\text{GDP}}$ is real motor gasoline price and Car/N denotes the stock of cars per capita.

Table 1 clearly shows that the two values of the Hausman statistic deviate strongly from each other, even if the null hypothesis is rejected in both cases. It is also interesting to observe that the two sets of standard errors remain close to each other⁷.
<table><caption>**Table 1.** Estimation results for motivating example 1, Gasoline.</caption><thead><tr><th>Specification</th><th></th><th>Intercept</th><th>log[Y/N]</th><th>log[P<sub>MG</sub>/P<sub>GDP</sub>]</th><th>log[Car/N]</th></tr></thead><tbody><tr><td rowspan="2">Within/fixed effects</td><td>Coef.</td><td>—</td><td>0.6622</td><td>-0.3217</td><td>-0.6405</td></tr><tr><td>Std Err.</td><td>—</td><td>0.0734</td><td>0.0441</td><td>0.0297</td></tr><tr><td rowspan="2">Between</td><td>Coef.</td><td>2.5416</td><td>0.9676</td><td>-0.9635</td><td>-0.7953</td></tr><tr><td>Std Err.</td><td>0.5268</td><td>0.1557</td><td>0.1329</td><td>0.0825</td></tr><tr><td rowspan="3">Random effects</td><td>Coef.</td><td>1.997</td><td>0.5550</td><td>-0.4204</td><td>-0.6068</td></tr><tr><td>Std Err._1</td><td>0.1782</td><td>0.0572</td><td>0.0387</td><td>0.0247</td></tr><tr><td>Std Err._2</td><td>0.1843</td><td>0.0591</td><td>0.0400</td><td>0.0255</td></tr><tr><td>HM<sup>1</sup><sub>O</sub></td><td>26.49505</td><td></td><td></td><td></td><td></td></tr><tr><td>HM<sup>2</sup><sub>O</sub></td><td>302.8037</td><td></td><td></td><td></td><td></td></tr><tr><td>σ̂<sup>2</sup><sub>ε</sub></td><td>0.0085</td><td></td><td></td><td></td><td></td></tr><tr><td>σ̂<sup>*</sup><sub>ε</sub></td><td>0.0091</td><td></td><td></td><td></td><td></td></tr><tr><td>ψ̂<sup>2</sup></td><td>0.0116</td><td></td><td></td><td></td><td></td></tr><tr><td>h</td><td>1.069</td><td></td><td></td><td></td><td></td></tr><tr><td>h<sup>*</sup><sub>min</sub></td><td>1.0409</td><td></td><td></td><td></td><td></td></tr><tr><td>h<sup>*</sup><sub>max</sub></td><td>2.0837</td><td></td><td></td><td></td><td></td></tr><tr><td>Within variance</td><td></td><td></td><td>0.0507</td><td>0.0162</td><td>0.3089</td></tr><tr><td>Between variance</td><td></td><td></td><td>0.3508</td><td>0.4424</td><td>1.1725</td></tr><tr><td>With. var. share (in %)</td><td>θ<sub>W</sub></td><td></td><td>12.6255</td><td>3.5325</td><td>20.8518</td></tr><tr><td>Betw. var. share (in %)</td><td>θ<sub>B</sub></td><td></td><td>87.3745</td><td>96.4675</td><td>79.1482</td></tr></tbody></table>

### 2.2.2. Motivating Example 2: Airline

Greene (2000) relies on the following specification concerning the cost function in the airline industry⁸:

$$ \log[\text{cost}] = \alpha + \beta_1 \cdot \log[\text{Q}] + \beta_2 \cdot \log[\text{fuel price}] + \beta_3 \cdot \text{load factor} + u $$

where *cost* is the total cost, in $1000; *Q* is output, measured in "revenue passenger miles" (index number); *fuel price* is fuel price and *load factor* is a rate of capacity utilization: it is the average rate at which seats on the airline's planes are filled. The dataset consists of six firms observed yearly for 15 years (1970 to 1984).

In this case (Table 2), $HM_O^1 > HM_O^2$ while the two values are much closer and clearly lower than in the previous case. They both lead to the rejection of the null. Also, the two sets of standard errors are quite close.

The airline case provides further interesting outcomes when the specification is estimated with two covariates. We single out the regression with $log[\text{fuel price}]$ and *load factor* as the two covariates. The corresponding estimation results are provided in Table 3.

This new set of results is interesting for the negative sign of the computed $HM_O^2$ and furthermore in that $HM_O^1 > |HM_O^2|$. Using the absolute value of the $HM_O^2$ statistic to perform the Hausman test (as some software packages do), the null hypothesis would not be rejected contrary to the outcome implied by $HM_O^1$. Note at this point that these results are obtained for a sample distribution of the covariate's observations featuring a structure of the variance largely skewed in its within dimension.
<table><caption>**Table 2.** Estimation results for motivating example 2, Airline.</caption><thead><tr><th>Specification</th><th></th><th>Intercept</th><th>log[Q]</th><th>log[fuel price]</th><th>load factor</th></tr></thead><tbody><tr><td rowspan="2">Within</td><td>Coef.</td><td>—</td><td>0.9193</td><td>0.4175</td><td>-1.0704</td></tr><tr><td>Std Err.</td><td>—</td><td>0.0299</td><td>0.0152</td><td>0.2017</td></tr><tr><td rowspan="2">Between</td><td>Coef.</td><td>85.8087</td><td>0.7825</td><td>-5.5239</td><td>-1.7510</td></tr><tr><td>Std Err.</td><td>56.4830</td><td>0.1088</td><td>4.4788</td><td>2.7432</td></tr><tr><td rowspan="3">Random effects</td><td>Coef.</td><td>9.6279</td><td>0.9067</td><td>0.4228</td><td>-1.0645</td></tr><tr><td>Std Err._1</td><td>0.2098</td><td>0.0256</td><td>0.0140</td><td>0.1998</td></tr><tr><td>Std Err._2</td><td>0.2102</td><td>0.0256</td><td>0.0140</td><td>0.2000</td></tr><tr><td colspan="2">HM<sup>1</sup><sub>O</sub></td><td>3.249</td><td></td><td></td><td></td></tr><tr><td colspan="2">HM<sup>2</sup><sub>O</sub></td><td>2.1247</td><td></td><td></td><td></td></tr><tr><td colspan="2">̂σ<sup>w</sup><sub>ε</sub><sup>2</sup></td><td>0.0036</td><td></td><td></td><td></td></tr><tr><td colspan="2">̂σ<sup>*</sup><sub>ε</sub><sup>2</sup></td><td>0.0036</td><td></td><td></td><td></td></tr><tr><td colspan="2">̂ψ<sup>2</sup></td><td>0.0152</td><td></td><td></td><td></td></tr><tr><td colspan="2">h</td><td>1.0029</td><td></td><td></td><td></td></tr><tr><td colspan="2">h<sup>*</sup><sub>min</sub></td><td>1.000</td><td></td><td></td><td></td></tr><tr><td colspan="2">h<sup>*</sup><sub>max</sub></td><td>1.3690</td><td></td><td></td><td></td></tr><tr><td colspan="2">Within variance</td><td></td><td>0.1751</td><td>0.6521</td><td>0.0021</td></tr><tr><td colspan="2">Between variance</td><td></td><td>1.1340</td><td>0.0005</td><td>0.0007</td></tr><tr><td colspan="2">With. var. share (in %)</td><td>θ<sub>W</sub></td><td>13.3777</td><td>99.9282</td><td>76.0391</td></tr><tr><td colspan="2">Betw. var. share (in %)</td><td>θ<sub>B</sub></td><td>86.6223</td><td>0.0718</td><td>23.9609</td></tr></tbody></table>

<table><caption>**Table 3.** Estimation results for motivating example 2, Airline, two covariates.</caption><thead><tr><th>Specification</th><th></th><th>Intercept</th><th>log[fuel price]</th><th>loadfactor</th></tr></thead><tbody><tr><td rowspan="2">Within</td><td>Coef.</td><td>—</td><td>0.7445</td><td>0.8684</td></tr><tr><td>Std Err.</td><td>—</td><td>0.0384</td><td>0.6780</td></tr><tr><td rowspan="2">Between</td><td>Coef.</td><td>419.760</td><td>-32.304</td><td>10.964</td></tr><tr><td>Std Err.</td><td>136.203</td><td>10.541</td><td>8.880</td></tr><tr><td rowspan="3">Random effects</td><td>Coef.</td><td>3.3673</td><td>0.7393</td><td>0.9931</td></tr><tr><td>Std Err._1</td><td>0.4179</td><td>0.0384</td><td>0.6758</td></tr><tr><td>Std Err._2</td><td>0.4471</td><td>0.0411</td><td>0.7230</td></tr><tr><td colspan="2">HM<sup>1</sup><sub>O</sub></td><td>14.5905</td><td></td><td></td></tr><tr><td colspan="2">HM<sup>2</sup><sub>O</sub></td><td>-0.2470</td><td></td><td></td></tr><tr><td colspan="2">̂σ<sup>w</sup><sub>ε</sub><sup>2</sup></td><td>0.0452</td><td></td><td></td></tr><tr><td colspan="2">̂σ<sup>*</sup><sub>ε</sub><sup>2</sup></td><td>0.0518</td><td></td><td></td></tr><tr><td colspan="2">̂ψ<sup>2</sup></td><td>0.0106</td><td></td><td></td></tr><tr><td colspan="2">h</td><td>1.1447</td><td></td><td></td></tr><tr><td colspan="2">h<sup>*</sup><sub>min</sub></td><td>1.0000</td><td></td><td></td></tr><tr><td colspan="2">h<sup>*</sup><sub>max</sub></td><td>1.0066</td><td></td><td></td></tr><tr><td colspan="2">Within variance (1)</td><td></td><td>0.6522</td><td>0.0021</td></tr><tr><td colspan="2">Between variance (2)</td><td></td><td>0.00047</td><td>0.0007</td></tr><tr><td colspan="2">With. var. share (in %)</td><td>θ<sub>W</sub></td><td>99.9282</td><td>76.0391</td></tr><tr><td colspan="2">Betw. var. share (in %)</td><td>θ<sub>B</sub></td><td>0.0718</td><td>23.9609</td></tr></tbody></table>

### 2.2.3. Motivating Example 3: Wage determination

In another application, Greene (2012) relies on Cornwell and Rupert (2008)'s study about the determinants of the returns to schooling. The dataset is a balanced panel of 595 observations on heads of households that runs over the period (1976–1982). Among the specifications examined by Greene, we consider the following one:

$$ \log[wage] = \alpha + \beta_1 \cdot EXP + \beta_2 \cdot (EXP)^2 + \beta_3 \cdot WKS + \beta_4 \cdot OCC + \beta_5 \cdot IND \\ \beta_6 \cdot SOUTH + \beta_7 \cdot SMSA + \beta_8 \cdot MS + \beta_9 \cdot UNION + u $$
where EXP denotes the number of years of full-time work experience; WKS, the number of weeks worked; OCC = 1 if the status of the occupation is blue-collar occupation, 0 if not; IND = 1 if the individual works in a manufacturing industry, 0 if not; SOUTH = 1 if the individual resides in the south, 0 if not; SMSA = 1 if the individual resides in a city, 0 if not; MS = 1 if the individual is married, 0 if not; UNION = 1 if the individual wage is set by a union contract, 0 if not; lastly log[wage] denotes the log of the (yearly) wage⁹.

The estimation results are presented in Table 4. Here, even with a large sample (4765 observations), we observe significant differences between the two Hausman statistics (which are very large) as well as the two sets of the standard errors for the random effects model (the ratio of the latter that is provided by $\sqrt{h}$ (see later) is close to 1.3).

<table><caption>**Table 4.** Estimation results for Motivating example 3, Wage.</caption><thead><tr><th>Specification</th><th></th><th>Intercept</th><th>Exp</th><th>(Exp)<sup>2</sup></th><th>WKS</th><th>OCC</th><th>IND</th><th>SOUTH</th><th>SMSA</th><th>MS</th><th>UNION</th></tr></thead><tbody><tr><td rowspan="2">Within</td><td>Coef.</td><td>—</td><td>0.1132</td><td>-0.0004</td><td>0.0008</td><td>-0.0215</td><td>0.0192</td><td>-0.0019</td><td>-0.0425</td><td>-0.0297</td><td>0.0328</td></tr><tr><td>Std Err.</td><td>—</td><td>0.0025</td><td>0.00005</td><td>0.0006</td><td>0.0138</td><td>0.0154</td><td>0.0343</td><td>0.0194</td><td>0.0190</td><td>0.014923</td></tr><tr><td rowspan="2">Between</td><td>Coef.</td><td>5.7222</td><td>0.0275</td><td>-0.0005</td><td>0.0089</td><td>-0.3536</td><td>0.0460</td><td>-0.1082</td><td>0.1815</td><td>0.3837</td><td>0.0891</td></tr><tr><td>Std Err.</td><td>0.1918</td><td>0.0053</td><td>0.0001</td><td>0.0040</td><td>0.0309</td><td>0.0282</td><td>0.0284</td><td>0.0283</td><td>0.0352</td><td>0.0324</td></tr><tr><td rowspan="3">Random effects</td><td>Coef.</td><td>5.4668</td><td>0.0838</td><td>-0.0008</td><td>0.0012</td><td>-0.1270</td><td>-0.0194</td><td>-0.0822</td><td>-0.0030</td><td>-0.0092</td><td>0.0374</td></tr><tr><td>Std Err._1</td><td>0.0417</td><td>0.0022</td><td>0.0001</td><td>0.006</td><td>0.0123</td><td>0.0134</td><td>0.0214</td><td>0.0157</td><td>0.0165</td><td>0.0133</td></tr><tr><td>Std Err._2</td><td>0.0554</td><td>0.0029</td><td>0.0001</td><td>0.0008</td><td>0.0164</td><td>0.0178</td><td>0.0284</td><td>0.0208</td><td>0.0219</td><td>0.01763</td></tr><tr><td>σ̂<sup>2</sup><sub>ε</sub></td><td>0.0231</td><td></td><td></td><td></td><td>3177.583</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>σ̂<sup>*2</sup><sub>ε</sub></td><td>0.0407</td><td></td><td></td><td></td><td>7569.713</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>h</td><td>1.7626</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>h<sup>*</sup><sub>min</sub></td><td>1.0221</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>h<sup>*</sup><sub>max</sub></td><td>2.6757</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>h</td><td>2.0566</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Within variance (1)</td><td></td><td>4</td><td></td><td>0.0087</td><td>15.5347</td><td>0.0300</td><td>0.0233</td><td>0.0048</td><td>0.0149</td><td>0.0155</td><td>0.0254</td></tr><tr><td>Between variance (2)</td><td></td><td>116.2324</td><td></td><td>0.0001</td><td>10.7666</td><td>0.2199</td><td>0.2157</td><td>0.2012</td><td>0.2114</td><td>0.1356</td><td>0.2061</td></tr><tr><td>With. var. share (in %)</td><td>θ<sub>W</sub></td><td>3.3269</td><td></td><td>3.3118</td><td>59.0643</td><td>11.9970</td><td>9.7561</td><td>2.3308</td><td>6.60679</td><td>10.2570</td><td>10.9640</td></tr><tr><td>Betw. var. share (in %)</td><td>θ<sub>B</sub></td><td>96.6731</td><td></td><td>96.6881</td><td>40.9357</td><td>88.0029</td><td>90.2439</td><td>97.6691</td><td>93.3932</td><td>89.7430</td><td>89.03604</td></tr></tbody></table>

### 3. The Two Versions of the Hausman Test Statistic

The two versions of the Hausman statistic refer to two possible approaches for estimating the covariance matrix of the estimator of the parameters of the model given in its RE specification (1) and (2). We first start with a formal and explicit presentation of these approaches since their implications for the computation of the Hausman test statistic have remained largely unnoticed.

#### 3.1. The Original Hausman Test Specification in a Balanced Panel Data Model

We rewrite model (1) and (2), stacking the observations over the time and cross-sectional dimensions:

$$ y = \iota_{NT} \cdot \alpha + \mathbf{X} \cdot \beta + \mathbf{u} \quad (3) $$

where $y$ is the $(NT \times 1)$ vector for the observations of the dependent variable; $\iota_{NT}$ a vector of ones of dimension $NT$ and $\mathbf{X}$ is the $(NT \times K)$ matrix including the observations of the $K$ explanatory variables; $\mathbf{u} = (u_{11} \cdots u_{1T} \cdots u_{N1} \cdots u_{NT})'$ is the $(NT \times 1)$ vector for the composite error terms. The covariance matrix of $\mathbf{u}$ is denoted by $\Omega$. Given the properties of $\alpha_i^*$ and $\varepsilon_{it}$, it takes the following form:

$$ \Omega = \sigma_{\varepsilon}^2 \cdot \Omega^* $$

with $\Omega^* = [W + (1/\psi^2) \cdot B]$, $\psi^2 = \sigma_{\varepsilon}^2 / \sigma_{\alpha\varepsilon}^2$, $\sigma_{\alpha\varepsilon}^2 = \sigma_{\varepsilon}^2 + T \cdot \sigma_{\alpha}^2$, $B = I_N \otimes (J_T/T)$ (the Between operator), $W = I_{NT} - B$ (the Within operator), where $\otimes$ is the Kronecker product, $I_N$ (resp. $I_T$) the $(N \times N)$ (resp. $(T \times T)$) identity matrix and $J_T = \iota_T \cdot l'_T$ a matrix of ones of dimension $T$.

It is useful to define $\Omega_C^*$ such that $\Omega_C^* = \Omega^* \cdot (I_{NT} - B_{NT}) = [W + (1/\psi^2) \cdot B_C]$ with $B_C$ denoting the centered Between operator defined as $B_C = B - B_{NT}$ and with $B_{NT} = \iota_{NT} \cdot (l'_{NT} \cdot \iota_{NT})^{-1} \cdot l'_{NT}$. We also use $\Omega^{-\frac{1}{2}}$ defined as $\Omega^{-\frac{1}{2}} \cdot \Omega^{-\frac{1}{2}} = \Omega^{-1}$. As $B$
and W are symmetric and idempotent, $\Omega^{*-1} = [W + \psi^2 \cdot B]$ and, in turn: $\Omega^{*-\frac{1}{2}} = [W + \psi \cdot B]$. The same applies to $\Omega_C^{*-\frac{1}{2}}$ and $\Omega_C^{*-1}$ with $B_C$ replacing B in the previous formulas.

Assume first, that the variance components (and thus $\Omega$, $\Omega^*$ and $\Omega_C^*$) are known. Then, it is well established that:

(1) The RE estimator of $\beta$ ($\hat{\beta}_{RE}$) corresponds to the Generalized Least Squares (GLS) estimator of $\beta$ in (3), noted $\hat{\beta}_{GLS}$, and is given by (4) with its covariance matrix by (5):

$$ \hat{\beta}_{RE} = \hat{\beta}_{GLS} = (\mathbf{X}' \cdot \Omega_C^{*-1} \cdot \mathbf{X})^{-1} \cdot (\mathbf{X}' \cdot \Omega_C^{*-1} \cdot \mathbf{y}) \quad (4) $$

$$ \mathbf{var}[\hat{\beta}_{RE}] = \mathbf{var}[\hat{\beta}_{GLS}] = \sigma_{\epsilon}^2 \cdot (\mathbf{X}' \cdot \Omega_C^{*-1} \cdot \mathbf{X})^{-1} \quad (5) $$

(2) The Within (or fixed effects) estimator of $\beta$, $\hat{\beta}_W$, is given by (6) and its covariance matrix by (7):

$$ \hat{\beta}_W = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot (\mathbf{X}'_W \cdot \mathbf{y}_W) \quad (6) $$

$$ \mathbf{var}[\hat{\beta}_W] = \sigma_{\epsilon}^2 \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \quad (7) $$

with $\mathbf{y}_W \equiv W \cdot \mathbf{y}$ and $\mathbf{X}_W \equiv W \cdot \mathbf{X}$.

The GLS estimator $\hat{\beta}_{GLS}$ can alternatively be obtained, using the quasi-demeaned model (also called the partial Within transformation model) built from (3) with the premultiplying factor$^{10}$ $\Omega^{*-\frac{1}{2}}$:

$$ \mathbf{y}_{**} = \omega_{**} \cdot \alpha + \mathbf{X}_{**} \cdot \beta + \mathbf{u}_{**} \quad (8) $$

with $\omega_{**} \equiv \psi \cdot l_{NT}$; $\mathbf{X}_{**} \equiv \Omega^{*-\frac{1}{2}} \cdot \mathbf{X}$; $\mathbf{y}_{**} \equiv \Omega^{*\frac{1}{2}} \cdot \mathbf{y}$; $\mathbf{u}_{**} \equiv \Omega^{*-\frac{1}{2}} \cdot \mathbf{u}$. It is easy to check that the OLS estimator of $\beta$ in (8)-denoted as $\hat{\beta}_{OLS}$-corresponds to $\hat{\beta}_{GLS}^{11}$. Also:

$$ \mathbf{var}[\hat{\beta}_{OLS}] = \mathbf{var}[\hat{\beta}_{GLS}] = \sigma_{\epsilon}^2 \cdot (\mathbf{X}'_* \cdot \mathbf{X}_*)^{-1} \quad (9) $$

where $\mathbf{X}_* \equiv \Omega_C^{*-\frac{1}{2}} \cdot \mathbf{X}$ which corresponds to (5) as $\mathbf{X}'_* \cdot \mathbf{X}_* = \mathbf{X}' \cdot \Omega_C^{*-1} \cdot \mathbf{X}$.

Based on the former estimators, the Hausman specification test statistic initially proposed by Hausman (1978) is:

$$ HM_{O*} \equiv \hat{q}' \cdot \{ \mathbf{var}[\hat{\beta}_W] - \mathbf{var}[\hat{\beta}_{RE}] \}^{-1} \cdot \hat{q} \quad (10) $$

with $\hat{q} \equiv \hat{\beta}_W - \hat{\beta}_{RE}$ and $\mathbf{var}(\hat{z})$ denoting the (finite sample) exact covariance matrix of $\hat{z}$. Under the null hypothesis of no-correlation, $HM_{O*}$ is asymptotically distributed as a $\chi^2(K)$.

## 3.2. Two Estimation Procedures

In practice, $\Omega$, $\Omega^*$ and $\Omega_C^*$ are unknown and replaced by consistent estimators (noted $\hat{\Omega}$, $\hat{\Omega}^*$ and $\hat{\Omega}_C^*$, respectively$^{12}$). In this case, the Hausman test statistic is written as:

$$ HM_O \equiv \hat{\beta}'_{\Delta WRE} \cdot \{ \mathbf{v}\hat{\mathbf{a}}_j[\hat{\beta}_W] - \mathbf{v}\hat{\mathbf{a}}_j[\hat{\beta}_{RE}] \}^{-1} \cdot \hat{\beta}_{\Delta WRE} $$

where:

(1) $\hat{\beta}_{\Delta WRE} \equiv \hat{\beta}_W - \hat{\beta}_{RE}$ with, now, $\hat{\beta}_{RE} = \hat{\beta}_{FGLS}$ indicating that the RE estimator corresponds to the Feasible Generalized Least Squares (FGLS) estimator for $\beta$ ($\hat{\beta}_{FGLS}$), accounting for the use of $\hat{\Omega}_C^*$ instead of $\Omega_C^*$.

(2) $\mathbf{v}\hat{\mathbf{a}}_j(\hat{z})$ is a consistent estimator of the asymptotic covariance matrix of $\hat{z}$ built upon the finite-sample estimator of the (exact) variance of $\hat{z}$ and with $j = 1, 2$ indicating that, for the RE estimator, two approaches are available to compute this matrix.

Under suitable conditions assumed to hold in what follows$^{13}$, $\hat{\beta}_{FGLS}$ and $\hat{\beta}_{GLS}$ are asymptotically equivalent and $HM_O$ is, as $HM_{O*}$, asymptotically distributed as a $\chi^2(K)$.
We now discuss the choice of variance component estimators that are required to compute $HM_O$.

First, a consistent estimator for $\mathbf{var}[\hat{\beta}_W]$ is: $\hat{\mathbf{var}}[\hat{\beta}_W] = \hat{\sigma}_\epsilon^{w2} \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1}$, where $\hat{\sigma}_\epsilon^{w2} = (\hat{\mathbf{u}}'_W \cdot \hat{\mathbf{u}}_W)/(N(T-1)-K)$ denotes the consistent estimator for $\sigma_\epsilon^2$ built from the OLS estimation associated with the Within (transformed) regression model, $\hat{\mathbf{u}}_W$ denoting the $(NT \times 1)$ vector of the related residuals.

Second, to obtain $\hat{\mathbf{var}}[\hat{\beta}_{FGLS}]$, two approaches are possible.

### 3.2.1. Approach 1: The (Direct) FGLS Approach

Relying on the asymptotic equivalence between $\hat{\beta}_{FGLS}$ and $\hat{\beta}_{GLS}$, the computation of a consistent, asymptotic covariance matrix estimator for $\mathbf{var}[\hat{\beta}_{RE}]$ can be considered directly from the expression (5) where $\hat{\Omega}_C^*$ is substituted for $\Omega_C^*$ and $\hat{\sigma}_\epsilon^2$ for $\sigma_\epsilon^2$, which yields:

$$ \mathbf{v}\hat{\mathbf{a}}_1[\hat{\beta}_{RE}] = \mathbf{v}\hat{\mathbf{a}}_1[\hat{\beta}_{FGLS}] = \hat{\sigma}_\epsilon^2 \cdot (\mathbf{X}' \cdot \hat{\Omega}_C^{-1} \cdot \mathbf{X})^{-1} \quad (11) $$

with $\hat{\Omega}_C^{-1} = [W + \hat{\psi}^2 \cdot B_C]$ and $\hat{\psi}^2 = (\hat{\sigma}_\epsilon^2 / \hat{\sigma}_{\Delta\epsilon}^2) \cdot \hat{\sigma}_\epsilon^2$ in (11) should logically be chosen as the same estimator as the one entering into$^{14}$ $\hat{\psi}^2$ for computing $\hat{\Omega}_C^*$ also appearing in (11). One usually relies on the estimator based on the 'fixed effects model' for this purpose, so that we set $\hat{\sigma}_\epsilon^2 = \hat{\sigma}_\epsilon^{w2}$ (Swamy-Arora approach). We use that correspondence in what follows.

### 3.2.2. Approach 2: The Quasi-Demeaning Approach

A consistent (asymptotic) covariance matrix estimator for $\hat{\beta}_{RE}$ can alternatively be obtained from the quasi-demeaning regression model (8) considered in its feasible version with $\hat{\Omega}^{-1/2}$ substituting for $\Omega^{-1/2}$ where $\hat{\Omega}^{-1/2} = W + \hat{\psi} \cdot B$ and $\hat{\psi} = \sqrt{\hat{\psi}^2}$. We note this feasible version of the QDM model as the FQDM regression model. In this case, and relying again on the asymptotic equivalence between $\hat{\beta}_{GLS}$ and $\hat{\beta}_{FGLS}$, the resulting “plug-in” estimator can then be computed from the formula giving the covariance matrix for the OLS estimator of $\beta$ in (8), i.e., (9), where $\tilde{\mathbf{X}}_*$ substitutes for $\mathbf{X}_*$ and $\hat{\sigma}_\epsilon^2$ for $\sigma_\epsilon^2$:

$$ \mathbf{v}\hat{\mathbf{a}}_2[\hat{\beta}_{RE}] = \mathbf{v}\hat{\mathbf{a}}_2[\hat{\beta}_{FGLS}] = \hat{\sigma}_\epsilon^2 \cdot (\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*)^{-1} \quad (12) $$

In line with the quasi-demeaning approach, the computation of $\hat{\sigma}_\epsilon^2$ is, here, usually considered as a byproduct of the OLS estimation process at work for the FQDM regression model. Accordingly, $\hat{\sigma}_\epsilon^2$ is computed as $\hat{\sigma}_\epsilon^2 = (\hat{\tilde{\mathbf{u}}}'_* \cdot \hat{\tilde{\mathbf{u}}}_*) / (NT - (K+1))$ where $\hat{\tilde{\mathbf{u}}}_*$ denotes the $NT$ vector of the OLS residuals in the FQDM regression model.

From (11) and (12), we observe that $\hat{\mathbf{var}}_1[\hat{\beta}_{RE}] \neq \hat{\mathbf{var}}_2[\hat{\beta}_{RE}]$ as $\hat{\sigma}_\epsilon^{w2} \neq \hat{\sigma}_\epsilon^2$. Thus, the two approaches differ in providing two distinct estimators for the variance of the (RE) estimator insofar as they rely on two different estimators of the variance component, $\sigma_\epsilon^2$. This leads to what we call, in the following, a disturbance variance disconnect problem.$^{15}$

## 3.3. Comparing the Two Versions

From the previous results, it follows that two possible expressions are available for an implementable version of the Hausman test statistic, depending on which estimator of the asymptotic covariance matrix for $\hat{\beta}_{RE}$ is chosen.

### 3.3.1. Two Statistics

Using $\hat{\mathbf{var}}_1[\hat{\beta}_{RE}]$, we have:

$$ HM_O^1 = \hat{\beta}'_{\Delta WRE} \cdot \left\{ \hat{\sigma}_\epsilon^{w2} \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} - \hat{\sigma}_\epsilon^{w2} \cdot (\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*)^{-1} \right\}^{-1} \cdot \hat{\beta}_{\Delta WRE} \quad (13) $$
or, using $\hat{\mathbf{v}}\hat{\mathbf{a}}\mathbf{r}_2[\hat{\beta}_{RE}]$, we have:

$$ HM_O^2 = (\hat{\beta}_{\Delta WRE})' \cdot \left\{ \hat{\sigma}_{\epsilon}^{w2} \cdot (\mathbf{X}_W' \cdot \mathbf{X}_W)^{-1} - \hat{\sigma}_{\epsilon}^{*2} \cdot (\tilde{\mathbf{X}}_*' \cdot \tilde{\mathbf{X}}_*)^{-1} \right\}^{-1} \cdot \hat{\beta}_{\Delta WRE} \quad (14) $$

Hausman (1978) originally proposed using $HM_O^1$, which he considered as the legitimate computational version of $HM_O^*$ (Hausman 1978, footnote 25, p. 1267):¹⁶

“Note that the elements of $\hat{q}$ and its standard errors are simply calculated given the estimates $\hat{\beta}_{FE}$ and of $\hat{\beta}_{FGLS}$ and their standard errors, **making sure to adjust to use the fixed effects estimate of $\hat{\sigma}_{\epsilon}^2$**.”

On the other hand, as we will see in Section 4, most software programs compute the Hausman test statistic based on the second measure, $HM_O^2$. Consequently, it is important to analyze how $HM_O^2$ behaves in relation to $HM_O^1$ in finite sample settings. For that purpose, define the ratio $h$ as $h = \hat{\sigma}_{\epsilon}^{*2}/\hat{\sigma}_{\epsilon}^{w2}$. $HM_O^2$ can then be rewritten as:

$$ HM_O^2 = \hat{\beta}'_{\Delta WRE} \cdot (\hat{\sigma}_{\epsilon}^{w2})^{-1} \cdot \left\{ (\mathbf{X}_W' \cdot \mathbf{X}_W)^{-1} - h \cdot (\tilde{\mathbf{X}}_*' \cdot \tilde{\mathbf{X}}_*)^{-1} \right\}^{-1} \cdot \hat{\beta}_{\Delta WRE} \quad (15) $$

Comparing with (13), we note that $HM_O^2$ diverges from $HM_O^1$ as $h \neq 1$.

### 3.3.2. Main Results

To go further into the comparison of the two versions of the Hausman test statistic, we rewrite their expressions as:

$$ HM_O^1 = \hat{\beta}'_{\Delta WRE} \cdot (\hat{\sigma}_{\epsilon}^{w2} \cdot \Gamma)^{-1} \cdot \hat{\beta}_{\Delta WRE} \quad (16) $$

$$ HM_O^2 = \hat{\beta}'_{\Delta WRE} \cdot (\hat{\sigma}_{\epsilon}^{w2} \cdot \tilde{\Gamma})^{-1} \cdot \hat{\beta}_{\Delta WRE} \quad (17) $$

where we define $\Gamma = (\mathbf{X}_W' \cdot \mathbf{X}_W)^{-1} - (\tilde{\mathbf{X}}_*' \cdot \tilde{\mathbf{X}}_*)^{-1}$ and $\tilde{\Gamma} = (\mathbf{X}_W' \cdot \mathbf{X}_W)^{-1} - h \cdot (\tilde{\mathbf{X}}_*' \cdot \tilde{\mathbf{X}}_*)^{-1}$.

From (16) and (17), the comparison between $HM_O^1$ and $HM_O^2$ is based on the one between $\tilde{\Gamma}$ and $\Gamma$. Note that $(\tilde{\mathbf{X}}_*' \cdot \tilde{\mathbf{X}}_*) = (\mathbf{X}_W' \cdot \mathbf{X}_W) + \hat{\psi}^2 \cdot (\mathbf{X}_{B_C}' \cdot \mathbf{X}_{B_C})$ with $\mathbf{X}_{B_C} = B_C \cdot \mathbf{X}$ and can be rewritten as $(\tilde{\mathbf{X}}_*' \cdot \tilde{\mathbf{X}}_*) = H^* \cdot (\mathbf{X}_W' \cdot \mathbf{X}_W)$ where $H^* = I_K + \hat{\psi}^2 \cdot (\mathbf{X}_{B_C}' \cdot \mathbf{X}_{B_C}) \cdot (\mathbf{X}_W' \cdot \mathbf{X}_W)^{-1}$. It follows that $\Gamma$ writes as $\Gamma = (\mathbf{X}_W' \cdot \mathbf{X}_W)^{-1} \cdot (H^* - I_K) \cdot H^{-1}$ and $\tilde{\Gamma}$ as $\tilde{\Gamma} = (\mathbf{X}_W' \cdot \mathbf{X}_W)^{-1} \cdot (H^* - h \cdot I_K) \cdot H^{-1}$.

Finally, define $h_{\min}^* \equiv \min(\sigma(H^*))$ and $h_{\max}^* \equiv \max(\sigma(H^*))$ with $\sigma(H^*)$ denoting the spectrum of $H^*$ and with: $1 < h_{\min}^* < h_{\max}^*$.

We establish the following results (see Appendix A for details and related proofs):

1. $\Gamma$ is a symmetric positive definite (SPD) matrix. It follows that $HM_O^1$ is a positive-definite quadratic form.

2. $\tilde{\Gamma}$ can be either a symmetric positive or a negative definite matrix or even an indefinite matrix depending on specific conditions holding for $h$. As a consequence, $HM_O^2$ can be of either sign (and even of indeterminate sign a priori) depending on the values taken by $h$. Specifically, we have:

(a) $\tilde{\Gamma}$ is a symmetric positive definite (SPD) matrix iff $h < h_{\min}^*$. In this case, $HM_O^2$ is a positive-definite quadratic form

(b) $\tilde{\Gamma}$ is a symmetric negative definite (SND) matrix iff $h > h_{\max}^*$. In this case, $HM_O^2$ is a negative-definite quadratic form

(c) $\tilde{\Gamma}$ is indefinite iff $h_{\min}^* \le h \le h_{\max}^*$. In this case, $HM_O^2$ can be of either sign, which is indeterminate a priori.
Based on those results, comparing $HM_O^2$ relative to $HM_O^1$ depends on whether $\tilde{\Gamma}$ is SPD or SND. We then have:

1. If $\tilde{\Gamma}$ is SPD, the relevant comparison relies upon the magnitude ($HM_O^2 - HM_O^1$). We have $HM_O^2 \ge HM_O^1$ whenever $h \ge 1$

2. If $\tilde{\Gamma}$ is SND, it necessarily follows that $HM_O^2 < 0 < HM_O^1$.

In establishing those results, we directly echo the discussions, mentioned in the introduction, about the positive definiteness of the variance-covariance matrix estimator in the expression of the Hausman test statistic. As we observe, whether this matrix is SPD or not (which translates into whether $\Gamma$ or $\tilde{\Gamma}$ is SPD or not) depends on the choice of the estimator for $\sigma_{\varepsilon}^2$, which, itself, hinges on the approach that is adopted to estimate the variance components associated with the RE model. In other terms, $\Gamma$ is, by construction, an SPD matrix, and this has to be related to the use of the same estimator for $\sigma_{\varepsilon}^2$, i.e., $\hat{\sigma}_{\varepsilon}^{w2}$, in the computation of the covariance matrix estimator. On the other hand, this is not necessarily the case for $\tilde{\Gamma}$ and this has to do with the fact that two different estimators have been considered for $\sigma_{\varepsilon}^2$, $\hat{\sigma}_{\varepsilon}^{w2}$ and $\hat{\sigma}_{\varepsilon}^{*2}$ ($h \ne 1$).

Table 5 provides an overview of all possible cases. A wide spectrum of outcomes can be obtained for the value of $HM_O^2$ depending on the value of $h$. Unreliable results for the test may arise notably when $HM_O^2$ is negative.

<table><caption>**Table 5.** Review of all cases.</caption><tbody><tr><td colspan="3" style="text-align: center;">h &lt; h<sup>*</sup><sub>min</sub><br/>(&Gamma; is SPD and HM<sub>O</sub><sup>2</sup> &gt; 0)</td></tr><tr><td>0 &lt; h &lt; 1 &lt; h<sup>*</sup><sub>min</sub><br/>1 &lt; h &lt; h<sup>*</sup><sub>min</sub></td><td>&Gamma; &gt; &Gamma;<br/>&Gamma; &gt; &Gamma;&#773;</td><td>HM<sub>O</sub><sup>1</sup> &gt; HM<sub>O</sub><sup>2</sup> &gt; 0<br/>HM<sub>O</sub><sup>2</sup> &gt; HM<sub>O</sub><sup>1</sup> &gt; 0</td></tr><tr><td colspan="3" style="text-align: center;">h<sup>*</sup><sub>min</sub> &lt; h &lt; h<sup>*</sup><sub>max</sub><br/>(&Gamma; and sign of HM<sub>O</sub><sup>2</sup> a priori indefinite)</td></tr><tr><td>1 &lt; h<sup>*</sup><sub>min</sub> &lt; h &lt; h<sup>*</sup><sub>max</sub></td><td>&Gamma; indefinite</td><td>HM<sub>O</sub><sup>1</sup> &le; HM<sub>O</sub><sup>2</sup></td></tr><tr><td colspan="3" style="text-align: center;">h<sup>*</sup><sub>max</sub> &lt; h<br/>(&Gamma; is SND and HM<sub>O</sub><sup>2</sup> &lt; 0)</td></tr><tr><td>1 &lt; h<sup>*</sup><sub>max</sub> &lt; h</td><td>&Gamma; negative definite</td><td>HM<sub>O</sub><sup>1</sup> &gt; 0 &gt; HM<sub>O</sub><sup>2</sup></td></tr></tbody></table>

### 3.3.3. Back to the Case Studies

Based on $h$ and the proposed metrics for $H^*$, we can now analyze the mechanisms driving the various outcomes observed for the case studies selected in Section 2.2.

From Tables 1–4, in 3 cases out of 4, $h_{\min}^* < h < h_{\max}^*$. It follows that in those cases, $\tilde{\Gamma}$ is an indefinite matrix. As a consequence, the sign of $HM_O^2$ is a priori indeterminate as well the relative magnitudes of $HM_O^1$ and $HM_O^2$. The observed outcome depends on the specific value taken by $\hat{\beta}_{\DeltaWRE}$ for the sample considered.

Conversely, in the two covariates’ regression case drawn from Greene, where $HM_O^2$ is computed as a negative scalar, we logically have $h > h_{\max}^*$ and even $h > 2 \cdot h_{\max}^* - 1$ which is consistent with $HM_O^1 > |HM_O^2|$, what we, by the way, also observe.

### 3.4. What about $h$?

As we have shown, the value of $h$ is key for determining the outcome of the Hausman test if it is measured through $HM_O^2$. In this section, we analyze the main determinants for this ratio and provide an illustration through simulations in the single regressor case.

#### 3.4.1. Determinants

The value of $h$ essentially derives from the comparison between $\hat{\sigma}_{\varepsilon}^{w2}$ and $\hat{\sigma}_{\varepsilon}^{*2}$ and therefore, in turn, from the two residual sums of squares that are associated with, respec-
### 3.4.2. Illustrations in the Single Regressor Case

To illustrate the role of the previous factors as well as to clarify their interpretation, we perform Monte-Carlo simulations on the behavior of the main magnitudes involved in the comparison between ($HM_O^1$) and ($HM_O^2$) in a single-regressor model ($K = 1$).

#### Preliminary Results

In such a setting, $X = \{x\}$ and the various expressions for the main estimators and statistics simplify accordingly. We measure the total sample variance in the observations for $x$ with $s_x^2 = (N \cdot T)^{-1} \cdot x_T^2$ and $x_T^2 = x' \cdot I_C \cdot x$, with $I_C = I_{NT} - B_{NT}$. We then define $x_W^2 = x' \cdot W \cdot x$ and $x_{B_C}^2 = x' \cdot B_C \cdot x$. By construction, we have $x_T^2 = x_{B_C}^2 + x_W^2$. Hence, $x_W^2$ and $x_{B_C}^2$ can be used as a measure of, respectively, the Within and the Between components (up to a $NT$-factor) of the total (empirical) variance in the NT observations contained in $x$. Finally, define $\theta_W = x_W^2 / x_T^2$ the share of the Within variance in the total variance. Then, substituting, we obtain:

$$h_{min} = h_{max} \equiv h^* = 1 + \frac{\hat{\psi}^2 \cdot x_{B_C}^2}{x_W^2} = 1 + \frac{\hat{\psi}^2 \cdot (1 - \theta_W)}{\theta_W} \\ HM_O^1 = \nu \cdot x_W^2 \cdot \frac{h^*}{h^* - 1} \\ h = 1 + \eta \cdot \left( \nu \cdot x_W^2 \cdot \frac{h^*}{h^* - 1} - 1 \right) \\ HM_O^2 = \nu \cdot x_W^2 \cdot \frac{h^*}{h^* - h}$$

with $\nu = (\hat{\sigma}_\epsilon^2)^{-1} \cdot (\hat{\beta}_{\Delta WRE})^2$ and $\eta = 1/(NT - 2)$.

#### Design of Simulations

We perform Monte-Carlo simulations on the behavior of the previous four quantities, $h^*$, $h$, $HM_O^1$ and $HM_O^2$. The details of the simulation design are presented in Appendix C. We generate several series of $y_{it}^a$ based on a model $y_{it}^a = \alpha + \beta \cdot x_{it}^a + u_{it}^a$, where we fix $\alpha = \beta = 1$ and we let the other parameters of the simulation vary: $N = (20, 40, 80)$, $T = (20, 40, 80)$, $s_x^2 = (0.01, 1, 100)$, $\theta_W = (0.1, 0.5, 0.9)$, $\sigma_u^2 = (0.01, 1, 100)$, $\rho_{xu} = (-0.99, -0.9, -0.5, 0, 0.5, 0.9, 0.99)$ and $\rho_u = (0.1, 0.5, 0.9)$ with the same notations as before, $\rho_{xu}$ is the correlation between $x$ and $u$ (on the cross-sectional dimension) and $\rho_u$ is the intra-class coefficient of the error term (share of the within variance in the total variance in $u$)$^{17}$. Then, for each combination of the parameters, we perform 199 replications and compute the median of $HM_O^1$ and $HM_O^2$. To explore the main dimensions of variability of $HM_O^1$ and $HM_O^2$, we perform an ANCOVA analysis (Table A2 in Appendix C) where we regress, respectively, each of the means and medians on the levels of the different parameters and the interactions that we found significant.

#### Results of the Simulations

The results are similar whether we consider the mean or the medians over the replications of the levels of $HM_O^1$ and $HM_O^2$ for each combination of parameters. The value of $HM_O^1$ and $HM_O^2$ significantly depend on $T$, $\theta_W$, high absolute values of $\rho_{xu}$ and $\rho_u$. Conversely, the scale parameters $x_T^2$ and $\sigma_u^2$ do not have a significant impact on $HM_O^1$ and $HM_O^2$.

The visual representation of the behavior of (the median) $HM_O^1$ and $HM_O^2$ for $N = 80$, $T = 80$, $s_x^2 = \sigma_u^2 = 1$ and $\rho_u = 0.5$ is in Figure 1. This illustrates the strong dependence of the values of the Hausman statistics on $\theta_W$ on the one hand and on the correlation between $x$ and $u$ on the other hand. In particular, for high absolute values of $\rho_{xu}$ and high values of $\theta_W$, $HMO_2$ even yields negative values.
This latter result is, for example, consistent with the regression outcomes obtained with log[fuel price] as a single covariate in the framework of motivating Example 2 [Airline]. In this case (see Table A3), $HM_O^2$ is computed as a negative scalar with $HM_O^1 > |HM_O^2|$. Note also the extremely large value of $\theta_W$ for the covariate which partly drives the values taken by $h^*$ and $h$.

<figure><img src="image_5.png" /><figcaption>**Figure 1.** Distribution of the median of $HM_O^1$ and $HM_O^2$, $N = 80$, $T = 80$, $s_x^2 = \sigma_u^2 = 1$ and $\rho_u = 0.5$.</figcaption></figure>

Finally, looking more closely at the distribution of negative values for $HM_O^2$ (Figure A1 in Appendix C), we clearly see that they are an increasing function of $\rho_u$, $\theta_W$ and $\rho_{xu}$ (correlation between $x$ and $u$) in absolute value. While the empirical size of both tests remains around 5% with little variations for the various values of the parameters, the power of $HM_O^2$ consequently drops to 0 for the highest values of $\rho_u$, $\theta_W$ and $\rho_{xu}$ (Figure A2 in Appendix C).

# 4. The Implementation of the Hausman Test in Standard Econometric Software Packages for Panel Data: A Brief Review and Discussion

In this section, we review how six well-known econometric software packages deal with the implementation of the Hausman test in a standard panel data model and provide some discussion.

## 4.1. Review

* STATA programming commands for the estimation of the random-effects panel data models (*xtreg* with the *re* option) rely on the specification of the quasi-demeaned model in (8). As a consequence, the random effects parameter estimates as well as its “conventional” covariance matrix estimate are provided as standard outputs of
the OLS regression performed on that model. In particular, the vce(conventional) - default - command yields the (asymptotic) covariance matrix estimate based on the standard variance estimator for OLS regression. This corresponds to v̂ar2[β̂$_{FGLS}$] with, accordingly, ̂σ̂₂ used for the residual variance estimate. The default version of the command for implementing the standard Hausman test (the hausman command) corresponds accordingly to HM²₀.

* The **R PLM** package developed by Croissant and Millo (2008) allows estimating a wide range of panel data models with R software. Regarding the random-effects specification, the estimation process can be implemented via the *plm* function, whose *model* argument takes the *random* option. Croissant and Millo (2008) point out that it could have been possible to program the computation of the covariance matrix estimator for β̂$_{FGLS}$ directly from the formula (11), "*once the variance components have been estimated and hence the covariance matrix of errors*". However, to limit the computational costs associated with the inversion of the (NT × NT) matrix (Ω̂) or (Ω̂*<sub>C</sub>) and the related memory limits to store it, *plm* resorts to the specification and estimation of the quasi-demeaning estimator (8). Then, the coefficients' covariance matrix estimator is readily calculated by applying the standard OLS formulas which, in the R language, go through the *vcov()* command.

The *phtest* command computes the Hausman test in *plm*. Its main arguments are the two-panel model objects that underlie the comparison (ex. *model* = *within* and *model* = *random*). The corresponding estimates of the asymptotic covariances matrices provided under both models are thus used to compute the Hausman statistic corresponding to *HM*<sup>1</sup><sub>O</sub>.

* **EViews** estimates the random effects models using feasible GLS. The first step refers to the estimation of the covariance matrix for the composite error formed by the effects and the idiosyncratic disturbance. The EViews 9 User's Guide II notes "*Once the component variances have been estimated, we form an estimator of the composite residual covariance, and then GLS transform the dependent and regressor data*". As for the computation of the FGLS estimate, Eviews uses the quasi-demeaned model specification and proceeds on this basis. However, the calculation of the related coefficients' covariance matrix is based on the direct application of the formula (11) and thus corresponds to v̂ar1[β̂<sub>FGLS</sub>]. The procedure for the Hausman test then corresponds to HM<sup>1</sup><sub>O</sub>.

* **MATLAB** provides estimation methods for the standard fixed (Within), between, and random effects models with the *the panel data toolbox*. Panel data models are estimated using the *panel(·)* function with the options argument set to *re* for the random effects model specification. The random effects FGLS estimates are based on the quasi-demeaned model and the asymptotic variance-covariance matrix for statistical inference is accordingly provided by *v̂ar2[β̂<sub>FGLS</sub>]* (see Equation (18) in Alvarez et al. (2017)). Then, *hausmantest* computes the Hausman test where the input of the *hausmantest* function requires the output structures of the two estimations to be compared. Accordingly, the statistics that are computed correspond to *HM*<sup>2</sup><sub>O</sub>.

* **GAUSS**: The GAUSS Times Serie∞s MT 3.0 TSMT provides a fixed effects and random effects models (TSCS) package that can be implemented through the *tsmt* library and the one-in-all tscsFit procedure. Another possibility is to use the *pdlib* GAUSS library and the *randomEffects* procedure in it. Both procedures implement the quasi-demeaning transformation on the original dataset and apply the standard OLS estimator on the transformed data so as to form the FGLS estimate. The covariance matrix estimate comes as a direct by-product of the OLS outcome so that *v̂ar2[β̂<sub>FGLS</sub>]* is used. The Hausman test provided in the tscsFit procedure is implemented accordingly and corresponds to *HM*<sup>2</sup><sub>O</sub>.

* **SAS** (SAS ETS 13.2) provides estimation methods for the standard fixed (Within), between, and random effects models in the balanced and unbalanced cases with the *PANEL procedure* toolbox. Standard panel data models are estimated using the
PROC PANEL command with the MODEL statement specifying the regression model and the assumptions for the error structure. Specifically, FIXONE and RANONE must be used to specify the fixed-effect and the random-effect models, respectively (in the cross-sectional one-way case). In the latter case, various methods (but not the Swamy-Arora approach) are proposed to estimate, in the first stage, the variance components (through the VCOMP = option). It is explicitly indicated that the random effects FGLS estimates are then based, in the balanced case, on these variance components estimates through the quasi-demeaning approach, where 'the random effects $\beta$ is then the result of simple OLS on the transformed data' (see SAS ETS 13.2 User Manual (2014), p. 1417). The estimator for the asymptotic variance-covariance matrix is thus provided by $\mathbf{v}\hat{\mathbf{r}}_2[\hat{\beta}_{FGLS}]$. The Hausman statistic is automatically generated and reported as a conventional F statistic, with the statistic computed as $HM_O^2$.

## 4.2. Discussion

As the previous review indicates, in all but one of the packages discussed above, the Hausman test is, by default, implemented through the computation of $HM_O^2$ with the quasi-demeaning estimator. The rationale for such a choice is computational. Indeed, the quasi-demeaning approach allows avoiding the inversion of the $(NT \times NT)$ matrix $\hat{\Omega}$ or $\Omega_C^*$, which can be computationally costly (in terms of time and rounding errors). Conversely, the quasi-demeaned model only requires partially demeaning the variables with $\theta \equiv 1 - \hat{\psi}$ as the partial demeaning factor. Yet, as a counterpart of this standard OLS regression, $\hat{\sigma}_\epsilon^* 2$ is naturally chosen to compute the residual variance estimate and, in turn, yields to $HM_O^2$, which might, as we have seen, be an unreliable statistic for the Hausman test. In what follows, we explore some ways to circumvent the problems posed by the use of this statistic.

(1) First, it is possible to compute $HM_O^1$ and still rely on the quasi-demeaning approach to estimate the parameters of the RE model (which, as mentioned before, is the default case in the vast majority of available econometric software). This can been easily seen from the relationship (21) that we established between $h$ and $HM_O^1$. Once $h$ has been determined, which only requires the OLS residual sums of squares from the estimation of the Within and the quasi-demeaning estimator, we can derive $HM_O^1$. Hence, the following procedure can be suggested, if required, to supplement the existing programs.

1. Use the quasi-demeaning estimator to compute the RE estimator for $\beta$ and $\hat{\sigma}_\epsilon^* 2$.

2. Use $\hat{\sigma}_\epsilon^* 2$ and $\hat{\sigma}_\epsilon^w 2$ (within regression) to compute $h$.

3. Rearranging (21), obtain $HM_O^1$ from $h$ as: $HM_O^1 = (NT - (K + 1)) \cdot (h - 1) + K$.

4. Implement the Hausman test on the basis of $HM_O^1$.

(2) Second, depending on the software packages considered, some programming options can be used to fix the potential 'variance disconnect' problem associated with the use of the statistic $HM_O^2$.

For example, in STATA, it is possible to use the sigmamore and/or sigmaless option commands when implementing the Hausman test. As indicated in STATA instructions: "sigmamore and sigmaless specify that the two covariance matrices used in the test be based on a common estimate of disturbance variance. sigmamore specifies that the covariance matrices be based on the estimated disturbance variance from the efficient estimator. sigmaless specifies that the covariance matrices be based on the estimated disturbance variance from the consistent estimator". Following the lines of Hausman's seminal approach would lead to the choice of sigmaless option, whereby the variance estimator, is based on the Within model, would be used¹⁸. This would ensure the test to be performed upon the $HM_O^1$ statistics. The choice of sigmamore¹⁹ would imply to consider a third test statistics, $HM_O^3$, where the common disturbance variance estimator would be based on the quasi-demeaned model, so that we would have: $HM_O^3 = \hat{\beta}'_{\Delta WRE} \cdot (\hat{\sigma}_\epsilon^* 2 \cdot \Gamma)^{-1} \cdot \hat{\beta}_{\Delta WRE}$. Comparing $HM_O^3$ and $HM_O^1$, we
observe that $HM_0^1 > HM_0^3$ whenever $h < 1$. Thus, the more likely it would be to favor (even unduly) the rejection of the null hypothesis on the basis of $HM_0^3$ when $h > 1$.

Some packages also offer the possibility to rely on an alternative expression for the Hausman statistic that does not involve the use of the RE estimator, so that it is immune to the variance disconnect problem. This expression was initially proposed by Hausman and Taylor (1981) and is based on the difference between the Between and Within estimators $\hat{q}^{**} = \hat{\beta}_W - \hat{\beta}_B$. Hausman and Taylor (1981, pp. 1382–83), establish that the resulting version of the Hausman statistic is numerically exactly identical to the one that is built upon $\hat{q}$ and used above, that is: $\hat{q}' \cdot [\text{var}(\hat{q})]^{-1} \cdot \hat{q} = \hat{q}^{**}' \cdot [\text{var}(\hat{q}^{**})]^{-1} \cdot \hat{q}^{**}$. Such a solution can be notably implemented in the R PLM package using the phtest command and specifying as arguments model = within and model = between.

(3) Finally, two other approaches that depart from the separate estimation of the FE and RE model parameters - which underlies the standard implementation of the Hausman test - can be emphasized. They have the advantage of solving the disturbance variance estimator disconnect problem, while allowing, more generally, for a robust implementation of the Hausman test²⁰.

(3.1) The first of these approaches relies on implementing an auxiliary regression, that was initially proposed by Hausman himself together with the presentation of the standard specification test (see also Mundlak 1978). This regression takes the following form:

$$ \tilde{\mathbf{y}}_{**} = \tilde{\mathbf{Z}}_{**} \cdot \delta + \mathbf{X}_W \cdot \gamma + \eta $$

with $\tilde{\mathbf{Z}}_{**} = [\tilde{\omega}_{**} : \tilde{\mathbf{X}}_{**}]$ where $\tilde{\omega}_{**} = \hat{\psi} \cdot l_{NT}$ and $\tilde{\mathbf{X}}_{**} = \hat{\Omega}^{-\frac{1}{2}} \cdot \mathbf{X}$; $\tilde{\mathbf{y}}_{**} = \hat{\Omega}^{-\frac{1}{2}} \cdot \mathbf{y}$ and $\eta$ a vector of standard random disturbances.

It can be shown that the formula of the standard Wald test statistic for testing whether $\gamma = 0$ in the previous regression framework is equivalent to the one of the standard Hausman test statistic as expressed in terms of the difference between the Between and Within estimators (see Hausman and Taylor 1981 and above)²¹. Resorting to this auxiliary regression framework has two advantages. First, it involves only one estimator for the covariance matrix in the Wald test statistic formula, that one for $\gamma$, which is immune to the positive definiteness problem that can be encountered with the standard Hausman test statistic. Second, and as underlined by Baltagi and Liu (2007), it can be made robust to heteroskedasticity of unknown form (see, also, Arellano 1993).²² Once the variables have been transformed to be included as regressors in the auxiliary regression framework, the latter can be implemented in a rather standard way in any of the software econometric packages we have reviewed supra.

(3.2) The second approach goes through implementing White (1982)'s reformulated Hausman specification test that is based on the Maximum Likelihood (ML) estimation of the FE and RE model parameters. The related test statistic takes the form:

$$ HW = n \cdot (\tilde{\beta}_{MLE}^W - \tilde{\beta}_{MLE}^{RE})' \cdot \tilde{S} \cdot (\tilde{\beta}_{MLE}^W - \tilde{\beta}_{MLE}^{RE}) $$

with $n \equiv (N \cdot T)$ and $\tilde{\beta}_{MLE}^W$ (resp. $\tilde{\beta}_{MLE}^{RE}$) denoting the ML estimator related to the Within (resp RE) regression framework; $\tilde{S}$ would serve as the covariance matrix estimator and involves the information matrices for both estimators of $\beta$, as well as outer products of scores within and between the two models under concern. White (1982) shows that $\tilde{S}$ remains positive definite even under misspecification (including heteroskedasticity).

The last two procedures we have presented could even be suggested to be used in the first place when assessing the relevance of the RE-model specification as they allow for globally robust implementation of the Hausman test in the context of panel data models (if only, insofar as they do not require to be directly based on the use of the RE (FGLS) disturbance variance estimator).
## 5. Conclusions

In this paper, we provide new analytical results of the behavior of the Hausman statistic for the test of orthogonality between the individual effects and the error term in a static and balanced panel data model. We compare the Hausman statistic computed with direct FGLS implementation and the Hausman statistic computed on the quasi-demeaned model. We show that this difference depends upon several parameters; in particular, the between-within structure of the regressors. We show by means of a Monte Carlo simulation in the single regressor case and of a set of well-known textbook examples that the difference can be substantial and that in some cases, the Hausman statistic computed on the basis of the quasi-demeaned model can yield strong negative values. Therefore, despite its computational advantage, the quasi-demeaned model should not be used prima facie as the basis of the computation of the Hausman statistic. We suggest, if needed, to supplement the existing software instructions so as to be able to compute in any case the relevant statistic. Extensions can include deriving these analytical results for unbalanced panel data models, two-way component models and dynamic panel models.

**Author Contributions:** Conceptualization, M.-A.S.; methodology, J.L.G. and M.-A.S.; validation, J.L.G.; formal analysis, M.-A.S.; investigation, M.-A.S.; resources, J.L.G.; data curation, J.L.G. and M.-A.S.; writing—original draft preparation, M.-A.S.; writing—review and editing, J.L.G. and M.-A.S.; visualization, J.L.G.; supervision, J.L.G.; project administration, M.-A.S. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Data Availability Statement:** The data are available upon request from the authors.

**Acknowledgments:** The authors thank the referees for their very useful comments and their careful reading of the first version submitted, which allowed to improve the paper. They also gratefully acknowledge the precious help of Alain Bachelot about the analysis of the definiteness of some matrices in the paper.

**Conflicts of Interest:** The authors declare no conflict of interest.

## Appendix A. Hausman Test Statistics

### Appendix A.1. Matrix Conditions

We first prove the following lemma (denoted below as Lemma A1):

**Lemma A1.** Let R and M be two (square) matrices of size K. We assume that R and (R · M) are symmetric positive definite (SPD). Then, M can be diagonalized and there exists a non singular matrix P such that:

$$P' \cdot R \cdot P = I \qquad (A1)$$

and

$$P' \cdot R \cdot M \cdot P = \text{diag}[\lambda_i(M)] \qquad (A2)$$

with $\lambda_i(M)$ denoting the i-th eigenvalue of matrix M and $\text{diag}[\lambda_i(M)]$ the diagonal matrix whose elements are the eigenvalues of matrix M ($i = 1, \dots, K$).

**Proof.** According to the spectral theorem (see Axler 2014), there exists a non-singular matrix $O_R$ such that

$$O_R^{-1} \cdot R \cdot O_R = \text{diag}[\lambda_i(R)], \quad O'_R = O_R^{-1}, \quad 0 < \lambda_i(R), \forall i$$

with $\lambda_i(R)$ denoting the i-th eigenvalue of matrix R and $\text{diag}[\lambda_i(R)]$ the diagonal matrix whose elements are the eigenvalues of matrix R ($i = 1, \dots, K$).
It follows that:

$$ \mathrm{diag}\left[\frac{1}{\sqrt{\lambda_i(R)}}\right] \cdot O'_R \cdot R \cdot O_R \cdot \mathrm{diag}\left[\frac{1}{\sqrt{\lambda_i(R)}}\right] = I $$

so that:

$$ Q' \cdot R \cdot Q = I, \quad \text{with} \quad Q = O_R \cdot \mathrm{diag}\left[\frac{1}{\sqrt{\lambda_i(R)}}\right] \qquad (A3) $$

We then consider the symmetric (positive definite) matrix C, defined as:

$$ C = R \cdot M $$

Consider in turn the matrix $Q' \cdot C \cdot Q$ that is symmetric. The spectral theorem ensures that there is a non-singular matrix $O_C$ that satisfies:

$$ O_C^{-1} \cdot Q' \cdot C \cdot Q \cdot O_C = \mathrm{diag}[\lambda_i(Q' \cdot C \cdot Q)] \quad \text{with} \quad O_C^{-1} = O'_C \qquad (A4) $$

Define the following matrix:

$$ P = Q \cdot O_C \qquad (A5) $$

(A4) ensures that

$$ P' \cdot C \cdot P = \mathrm{diag}[\lambda_i(Q' \cdot C \cdot Q)] \qquad (A6) $$

We have:

$$ P' \cdot R \cdot P = O'_C \cdot Q' \cdot R \cdot Q \cdot O_C = O'_C \cdot O_C = I $$

which leads to (A1).

Taking into account this result and refering on (A6), we see that:

$$ \begin{aligned} \mathrm{diag}[\lambda_i(Q' \cdot C \cdot Q)] &= P' \cdot R \cdot M \cdot P \\ &= P' \cdot R \cdot (P \cdot P^{-1}) \cdot M \cdot P \\ &= (P' \cdot R \cdot P) \cdot P^{-1} \cdot M \cdot P = P^{-1} \cdot M \cdot P \end{aligned} $$

This shows that M can be diagonalized and that

$$ \mathrm{diag}[\lambda_i(M)] = \mathrm{diag}[\lambda_i(Q' \cdot C \cdot Q)] = P' \cdot R \cdot M \cdot P \qquad (A7) $$

which is (A2). □

## Appendix A.2. Applications

We obtain the following properties and results:

* We first note that $\Gamma = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} - (\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*)^{-1}$ and $\tilde{\Gamma} = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} - h \cdot (\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*)^{-1}$ are two symmetric (real valued) matrices. This comes from the definition of $(\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*)$ which is computed as the sum of two symmetric matrices, $(\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*) = (\mathbf{X}'_W \cdot \mathbf{X}_W) + \hat{\psi}^2 \cdot (\mathbf{X}'_{B_C} \cdot \mathbf{X}_{B_C})$.

* We have$^{23}$ $(\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*) \succ (\mathbf{X}'_W \cdot \mathbf{X}_W)$ and, in turn$^{24}$, $(\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \succ (\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*)^{-1}$. It follows that $\Gamma$ is a symmetric positive definite (SPD) matrix.

As defined in the main text, $H^* \equiv I_K + \hat{\psi}^2 \cdot (\mathbf{X}'_{B_C} \cdot \mathbf{X}_{B_C}) \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1}$ while $(\tilde{\mathbf{X}}'_* \cdot \tilde{\mathbf{X}}_*) = H^* \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)$. Then:

* Note $R = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot H^{*-1}$ and $M = H^*$. By construction $R$ and $(R \cdot M)$ are two real positive symmetric definite matrices (this is because $R \cdot M = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1}$ and that $R$ can be written as $R = [(\mathbf{X}'_W \cdot \mathbf{X}_W) + \hat{\psi}^2 \cdot (\mathbf{X}'_{B_C} \cdot \mathbf{X}_{B_C})]^{-1}$ which is the inverse of the sum of two symmetric positive definite matrices).
We then deduce from Lemma1 that $H^*$ can be diagonalised and that there exists a non singular matrix $P$ such that:

$$ 
\begin{aligned}
\mathrm{diag}[\lambda_i(H^*)] &= P' \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot H^{*-1} \cdot H^* \cdot P \\
&= P' \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot P
\end{aligned}
$$

As $[P' \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot P]$ is SPD (given that $(\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1}$ is itself SPD), this ensures that the spectrum of $H^*$ is only composed of strictly positive elements.

* Let $R = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1}$ and $M = H^{*-1}$. By construction, $R$ and $(R \cdot M)$ are again two real symmetric positive matrices. We deduce from Lemma1 that $H^{*-1}$ can be diagonalised and that there exists a non singular matrix $P$ such that:

$$ 
\begin{cases}
P' \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot P = I \\
P' \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot H^{*-1} \cdot P = \mathrm{diag}[\lambda_i(H^{*-1})] = \mathrm{diag}[\lambda_i^{-1}(H^*)]
\end{cases}
$$

* Noticing that $\Gamma = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot (H^* - I_K) \cdot H^{*-1} = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} - (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot H^{*-1}$, then, on the basis of the results above, we can write $(P' \cdot \Gamma \cdot P)$ as:

$$ P' \cdot \Gamma \cdot P = \mathrm{diag} \left[ 1 - \frac{1}{\lambda_i(H^*)} \right] $$

Then, let $\mathbf{x}$ denote a non-null vector, and setting $\mathbf{y} \equiv P^{-1} \cdot \mathbf{x}$, we obtain the spectral decomposition of $\Gamma$ as:

$$ \mathbf{x}' \cdot \Gamma \cdot \mathbf{x} = \mathbf{y}' \cdot (P' \cdot \Gamma \cdot P) \cdot \mathbf{y} = \sum_i \left( 1 - \frac{1}{\lambda_i(H^*)} \right) \cdot y_i^2 $$

Since we know that $\Gamma$ is SPD, we obtain from the latter decomposition that $\forall i, 1 - 1/(\lambda_i(H^*)) > 0$. which implies that $h_{\min}^* > 1$.

* Further, noticing that $\tilde{\Gamma} = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot (H^* - h \cdot I_K) \cdot H^{*-1} = (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} - h \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot H^{*-1}$ and proceeding as for above, we can write $(P' \cdot \tilde{\Gamma} \cdot P)$ as:

$$ P' \cdot \tilde{\Gamma} \cdot P = \mathrm{diag} \left[ 1 - \frac{h}{\lambda_i(H^*)} \right] $$

Let $\mathbf{x}$ denote a non-null vector, and setting $\mathbf{y} \equiv P^{-1} \cdot \mathbf{x}$, we obtain the spectral decomposition of $\tilde{\Gamma}$ as:

$$ \mathbf{x}' \cdot \tilde{\Gamma} \cdot \mathbf{x} = \mathbf{y}' \cdot (P' \cdot \tilde{\Gamma} \cdot P) \cdot \mathbf{y} = \sum_i \left( 1 - \frac{h}{\lambda_i(H^*)} \right) \cdot y_i^2 $$

From this spectral decomposition, we conclude that

- $\tilde{\Gamma}$ will be SPD if and only if $\forall i, 1 - \frac{h}{\lambda_i(H^*)} > 0$, that is, if and only if $h < h_{\min}^*$ is fulfilled.

- $\tilde{\Gamma}$ will be SND if and only if $\forall i, 1 - \frac{h}{\lambda_i(H^*)} < 0$, that is, if and only if $h > h_{\max}^*$ is fulfilled.

We now use the previous results to compare $HM_O^1$ and $HM_O^2$. For that purpose, we must distinguish according to whether $HM_O^2$ is (for sure) a positive or (for sure) a non-positive quadratic form. This does in turn depend on whether $\tilde{\Gamma}$ is SPD or SND.
* If $\tilde{\Gamma}$ is SPD, the relevant comparison can be built on the magnitude $HM_O^1 - HM_O^2$. The former can be written as:

$$ HM_O^1 - HM_O^2 = \hat{\beta}'_{\Delta WRE} \cdot (\hat{\sigma}_\epsilon^w)^{-1} \cdot [\Gamma^{-1} - \tilde{\Gamma}^{-1}] \cdot \hat{\beta}_{\Delta WRE} \\ = (\hat{\sigma}_\epsilon^w)^{-1} \cdot \hat{\beta}'_{\Delta WRE} \cdot \Xi \cdot \hat{\beta}_{\Delta WRE} $$

with $\Xi \equiv \Gamma^{-1} - \tilde{\Gamma}^{-1}$.

Thus, $HM_O^1 \ge HM_O^2$ whenever $\Xi$ is SPD or SND. Given the definition of $\Xi$, and since $\tilde{\Gamma}$ is SPD, this, in turn, depends on whether $\tilde{\Gamma} - \Gamma$ is SPD or SND.

Then, observe that $\tilde{\Gamma} - \Gamma = (1 - h) \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot H^{*-1}$.

As $(\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot H^{*-1}$ is SPD, it follows that whether $\tilde{\Gamma} - \Gamma$ is SPD or SND depends on whether $h \le 1$.

* If $\tilde{\Gamma}$ is SND, the relevant comparison is between $HMO_1$ and $|HMO_2|$, and can be built on $HMO_1 - |HMO_2|$. The former magnitude can be written as:

$$ HM_O^1 - |HMO_2| = \hat{\beta}'_{\Delta WRE} \cdot (\hat{\sigma}_\epsilon^w)^{-1} \cdot [\Gamma^{-1} - \tilde{\Gamma}^{*-1}] \cdot \hat{\beta}_{\Delta WRE} \\ = (\hat{\sigma}_\epsilon^w)^{-1} \cdot \hat{\beta}'_{\Delta WRE} \cdot \Xi^* \cdot \hat{\beta}_{\Delta WRE} $$

where $\tilde{\Gamma}^* = -\tilde{\Gamma}$ and $\Xi^* \equiv \Gamma^{-1} - \tilde{\Gamma}^{*-1}$.

Thus, $HM_O^1 \ge |HMO_2|$ whenever $\Xi^*$ is SPD or SND. Given the definition of $\Xi^*$, and as $\tilde{\Gamma}^*$ is SPD (since $\tilde{\Gamma}$ is SND), this, in turn, depends on whether $\Gamma - \tilde{\Gamma}^*$ is SND or SPD.

Then, observe that $\Gamma - \tilde{\Gamma}^* = \Gamma + \tilde{\Gamma} = 2 \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} - (1 + h) \cdot (\mathbf{X}'_W \cdot \mathbf{X}_W)^{-1} \cdot H^{*-1}$.

Proceeding as for $\tilde{\Gamma}$ above, we can write $(P' \cdot (\Gamma + \tilde{\Gamma}) \cdot P)$ as:

$$ P' \cdot (\Gamma + \tilde{\Gamma}) \cdot P = \mathrm{diag} \left[ 2 - \frac{1+h}{\lambda_i(H^*)} \right] $$

Note by $\mathbf{x}$ a non-null vector, and setting $\mathbf{y} \equiv P^{-1} \cdot \mathbf{x}$, we obtain the spectral decomposition of $(\Gamma + \tilde{\Gamma})$ as:

$$ \mathbf{x}' \cdot (\Gamma + \tilde{\Gamma}) \cdot \mathbf{x} = \mathbf{y}' \cdot (P' \cdot (\Gamma + \tilde{\Gamma}) \cdot P) \cdot \mathbf{y} = \sum_i (2 - \frac{1+h}{\lambda_i(H^*)}) \cdot \mathbf{y}_i^2 $$

From this spectral decomposition, we conclude that:

- $(\Gamma + \tilde{\Gamma})$ will be SPD if and only if $\forall i, 2 - \frac{1+h}{\lambda_i(H^*)} > 0$, that is, if and only if $h < 2 \cdot h_{\min}^* - 1$.

- Conversely, $(\Gamma + \tilde{\Gamma})$ will be SND if and only if $\forall i, 2 - \frac{1+h}{\lambda_i(H^*)} < 0$, that is, if and only if $h > 2 \cdot h_{\max}^* - 1$.

Hence, we obtain the following table covering all cases:
<table><caption>**Table A1.** Review of all cases.</caption><tbody><tr><td colspan="3">h &lt; h<sup>*</sup><sub>min</sub><br/>(Γ̃ is SPD and HM<sup>2</sup><sub>O</sub> &gt; 0)</td></tr><tr><td>0 &lt; h &lt; 1 &lt; h<sup>*</sup><sub>min</sub><br/>1 &lt; h &lt; h<sup>*</sup><sub>min</sub></td><td>Γ̃ &gt; Γ<br/>Γ &gt; Γ̃</td><td>HM<sup>1</sup><sub>O</sub> &gt; HM<sup>2</sup><sub>O</sub><br/>HM<sup>2</sup><sub>O</sub> &gt; HM<sup>1</sup><sub>O</sub></td></tr><tr><td colspan="3">h<sup>*</sup><sub>min</sub> &lt; h &lt; h<sup>*</sup><sub>max</sub><br/>(Γ̃ and sign of HM<sup>2</sup><sub>O</sub> a priori indefinite)</td></tr><tr><td>1 &lt; h<sup>*</sup><sub>min</sub> &lt; h &lt; h<sup>*</sup><sub>max</sub></td><td>Γ̃ indefinite</td><td>HM<sup>1</sup><sub>O</sub> &le; HM<sup>2</sup><sub>O</sub></td></tr><tr><td colspan="3">h<sup>*</sup><sub>max</sub> &lt; h<br/>(Γ̃ is SND and HM<sup>2</sup><sub>O</sub> &lt; 0)</td></tr><tr><td>1 &lt; h<sup>*</sup><sub>max</sub> &lt; h &lt; 2 &middot; h<sup>*</sup><sub>min</sub> - 1<br/>2 &middot; h<sup>*</sup><sub>min</sub> - 1 &lt; h &lt; 2 &middot; h<sup>*</sup><sub>max</sub> - 1<br/>2 &middot; h<sup>*</sup><sub>max</sub> - 1 &lt; h</td><td>Γ &gt; (-Γ̃)<br/>(Γ + Γ̃) indefinite<br/>(-Γ̃) &gt; Γ</td><td>|HM<sup>2</sup><sub>O</sub>| &gt; HM<sup>1</sup><sub>O</sub><br/>|HM<sup>2</sup><sub>O</sub>| &le; HM<sup>1</sup><sub>O</sub><br/>HM<sup>1</sup><sub>O</sub> &gt; |HM<sup>2</sup><sub>O</sub>|</td></tr></tbody></table>

## Appendix B. Relation between Within Residuals and Quasi-Demeaned Residuals

**Preliminary Result:** We first show that:

$$ \hat{\mathbf{u}}_{**} = \hat{\mathbf{u}}_{W} + \hat{\psi} \cdot \hat{\mathbf{u}}_{B} + \mathbf{G} \cdot (\hat{\beta}_{W} - \hat{\beta}_{B}) $$

**Proof.** We start with the definition of $\hat{\mathbf{u}}_{**}$, the NT vector of the OLS residuals in the FQDM regression model. We have:

$$ \hat{\mathbf{u}}_{**} = \tilde{\mathbf{y}}_{**} - \tilde{\omega}_{**} \cdot \hat{\alpha}_{\text{FGLS}} - \tilde{\mathbf{X}}_{**} \cdot \hat{\beta}_{\text{FGLS}} \quad (\text{A8}) $$

with $\tilde{\omega}_{**} \equiv \hat{\psi} \cdot \iota_{\text{NT}}$; $\tilde{\mathbf{X}}_{**} \equiv \hat{\Omega}^{*-\frac{1}{2}} \cdot \mathbf{X}$; $\tilde{\mathbf{y}}_{**} \equiv \hat{\Omega}^{*-\frac{1}{2}} \cdot \mathbf{y}$. Using the definition of $\hat{\Omega}^{*-\frac{1}{2}} \equiv W + \hat{\psi} \cdot B$, we can rewrite (A8) as:

$$ \begin{aligned} \hat{\mathbf{u}}_{**} = \hat{\mathbf{u}}_{W} + \hat{\psi} \cdot \hat{\mathbf{u}}_{B} + \mathbf{X}_{W} \cdot (\hat{\beta}_{W} - \hat{\beta}_{\text{FGLS}}) & \quad (\text{A9}) \\ & + \hat{\psi} \cdot \iota_{\text{NT}} \cdot (\hat{\alpha}_{B} - \hat{\alpha}_{\text{FGLS}}) + \hat{\psi} \cdot \mathbf{X}_{B} \cdot (\hat{\beta}_{B} - \hat{\beta}_{\text{FGLS}}) \end{aligned} $$

where $\hat{\mathbf{u}}_{B}$ denotes the NT vector of the OLS regression residuals for the Between (transformed) regression model; $\mathbf{X}_{B} \equiv B \cdot \mathbf{X}$ and $\hat{\beta}_{B}$ is the OLS estimator of $\beta$ in the Between transformed model which can be expressed as $\hat{\beta}_{B} = (\mathbf{X}'_{B_C} \cdot \mathbf{X}_{B_C})^{-1} \cdot (\mathbf{X}'_{B_C} \cdot \mathbf{y})$ with $\mathbf{X}_{B_C} \equiv B_C \cdot \mathbf{X}$ and (as a reminder) $B_C$ denoting the centered Between operator defined as $B_C \equiv B - B_{NT}$ with $B_{NT} \equiv \iota_{NT} \cdot (\iota'_{NT} \cdot \iota_{NT})^{-1} \cdot \iota'_{NT}$.

Then, noting that $\hat{\alpha}_{J} = (\iota'_{NT} \cdot \iota_{NT})^{-1} \cdot \iota'_{NT} \cdot (\mathbf{y} - \mathbf{X} \cdot \hat{\beta}_{J})$ for $J = B, \text{FGLS}$, which leads to: $\iota_{NT} \cdot (\hat{\alpha}_{B} - \hat{\alpha}_{\text{FGLS}}) = B_{NT} \cdot \mathbf{X} \cdot (\hat{\beta}_{\text{FGLS}} - \hat{\beta}_{B})$ and using the following relationship between $\hat{\beta}_{W}, \hat{\beta}_{B}$ and $\hat{\beta}_{\text{FGLS}}$:

$$ \hat{\beta}_{\text{FGLS}} = \mathbf{\Pi} \cdot \hat{\beta}_{B} + [I_{K} - \mathbf{\Pi}] \cdot \hat{\beta}_{W} \quad (\text{A10}) $$

with $\mathbf{\Pi} \equiv \hat{\psi}^2 \cdot [\mathbf{X}' \cdot \hat{\Omega}_C^{*-1} \cdot \mathbf{X}]^{-1} \cdot (\mathbf{X}'_{B_C} \cdot \mathbf{X}_{B_C}) = \hat{\psi}^2 \cdot [\tilde{\mathbf{X}}'_{*} \cdot \tilde{\mathbf{X}}_{*}]^{-1} \cdot (\mathbf{X}'_{B_C} \cdot \mathbf{X}_{B_C})$ and, as a reminder, $\hat{\Omega}_C^{*-1} \equiv (W + \hat{\psi}^2 \cdot B_C)$, we can rewrite equation (A9) as:

$$ \hat{\mathbf{u}}_{**} = \hat{\mathbf{u}}_{W} + \hat{\psi} \cdot \hat{\mathbf{u}}_{B} + \mathbf{G} \cdot (\hat{\beta}_{W} - \hat{\beta}_{B}) \quad (\text{A11}) $$
with:

$$ 
\begin{aligned}
\mathbf{G} &\equiv \mathbf{X}_W \cdot \mathbf{\Pi} - \hat{\psi} \cdot (B - B_{NT}) \cdot \mathbf{X} \cdot [I_K - \mathbf{\Pi}] \\
&= \mathbf{X}_W \cdot \mathbf{\Pi} - \hat{\psi} \cdot \mathbf{X}_{BC} \cdot [I_K - \mathbf{\Pi}]
\end{aligned}
$$

<figure><img src="image_6.png" /></figure>

**Other results:** Define $\mathbf{\Pi}^*$ and $G^*$ such that $\mathbf{\Pi} = \hat{\psi} \cdot \mathbf{\Pi}^*$ and $\mathbf{G} = \hat{\psi} \cdot G^*$. We have:

$$ \mathbf{G}^* = \mathbf{X}_W \cdot \mathbf{\Pi}^* - \mathbf{X}_{BC} \cdot [I_K - \hat{\psi} \cdot \mathbf{\Pi}^*] $$

and replacing in (A11):

$$ \hat{\mathbf{u}}_{**} = \hat{\mathbf{u}}_{W} + \hat{\psi} \cdot [\hat{\mathbf{u}}_{B} + \mathbf{G}^* \cdot (\hat{\beta}_{W} - \hat{\beta}_{B})] \quad (A12) $$

Using the property according to which $B_C \cdot W = W \cdot B_C = 0$, we deduce, after manipulations, from (A12), the following relationship between the two residual sums of squares $\hat{\mathbf{u}}'_W \cdot \hat{\mathbf{u}}_W$ and $\hat{\mathbf{u}}'_** \cdot \hat{\mathbf{u}}_{**}$:

$$ \hat{\mathbf{u}}'_{**} \cdot \hat{\mathbf{u}}_{**} = \hat{\mathbf{u}}'_W \cdot \hat{\mathbf{u}}_W + \hat{\psi}^2 \cdot \hat{\mathbf{u}}'_B \cdot \hat{\mathbf{u}}_B + \Delta^* $$

which corresponds to the equation provided in the main text in Section 3.4.1 and where:

$$ \Delta^* = \hat{\psi}^2 \cdot (\hat{\beta}_W - \hat{\beta}_B)' \cdot \mathbf{\Sigma}^* \cdot (\hat{\beta}_W - \hat{\beta}_B) \quad (A13) $$

and$^{25}$:

$$ 
\begin{aligned}
\mathbf{\Sigma}^* &= \mathbf{G}^* \cdot \mathbf{G}^* \\
&= (\mathbf{X}_{BC}' \cdot \mathbf{X}_{BC}) \cdot (\tilde{\mathbf{X}}_* \cdot \tilde{\mathbf{X}}_*)^{-1} \cdot (\mathbf{X}_W' \cdot \mathbf{X}_W)
\end{aligned}
$$

Finally, noting from (A10) that: $\hat{\beta}_W - \hat{\beta}_B = \mathbf{\Pi}^{-1} \cdot [\hat{\beta}_W - \hat{\beta}_{FGLS}]$, we can rewrite (A13) as:

$$ \Delta^* = \hat{\psi}^2 \cdot (\hat{\beta}_W - \hat{\beta}_{FGLS})' \cdot (\mathbf{\Pi}^{-1})' \cdot \mathbf{\Sigma}^* \cdot \mathbf{\Pi}^{-1} \cdot (\hat{\beta}_W - \hat{\beta}_{FGLS}) \quad (A14) $$

Define $\tilde{\mathbf{\Sigma}}^* = (\mathbf{\Pi}^{-1})' \cdot \mathbf{\Sigma}^* \cdot \mathbf{\Pi}^{-1}$. Using the definition of $\mathbf{\Sigma}^*$ and $\mathbf{\Pi}$, this can be written as:

$$ 
\begin{aligned}
\tilde{\mathbf{\Sigma}}^* &= (\hat{\psi}^4)^{-1} \cdot (\mathbf{X}_W' \cdot \mathbf{X}_W) \cdot (\mathbf{X}_{BC}' \cdot \mathbf{X}_{BC})^{-1} \cdot (\tilde{\mathbf{X}}_* \cdot \tilde{\mathbf{X}}_*) \\
&= (\hat{\psi}^2)^{-1} \cdot \Gamma^{-1}
\end{aligned}
$$

with $\Gamma^{-1}$ being written as: $\Gamma^{-1} = (\hat{\psi}^2)^{-1} \cdot (\mathbf{X}_W' \cdot \mathbf{X}_W) \cdot (\mathbf{X}_{BC}' \cdot \mathbf{X}_{BC})^{-1} \cdot (\tilde{\mathbf{X}}_* \cdot \tilde{\mathbf{X}}_*)$. Replacing in (A14), we have:

$$ \Delta^* = (\hat{\beta}_W - \hat{\beta}_{FGLS})' \cdot \Gamma^{-1} \cdot (\hat{\beta}_W - \hat{\beta}_{FGLS}) $$

which is the expression provided in the main text for $\Delta^*$.

## Appendix C. Simulations in the Single Regressor Case ($K = 1$)

In the simulations for $K = 1$, we focus on the role played by the structure in $\mathbf{X}$ and in $\mathbf{u}$ on the values taken by $h$ and $h^*$ as well as by the Hausman statistics $HM_0^1$ and $HM_0^2$. Those structural features are captured, respectively, by $s_\mathbf{x}^2$ and $\theta_W$ on the one hand and by $\sigma_u^2$ and $\rho_u$ on the other hand where $\sigma_u^2 = \sigma_\alpha^2 + \sigma_\epsilon^2$ and $\rho_u = \frac{\sigma_\alpha^2}{\sigma_u^2} (\rho_u)$ is called the intra-class
correlation coefficient in the variance component literature). We let also the degree of correlation between the regressor and the (composite) error term on the cross-sectional dimension vary across the experiments (we call it $\rho_{xu}$).

Accordingly, for a given value of $(s_X^2, \theta_W; \sigma_u^2; \rho_u; \rho_{xu})$ as well as for a given size of the sample (N and T given), we generate (with replications) one series for $\mathbf{u} = \{u_{it}\}_{i=1,...,N}^{t=1,...,T}$ and one for $\mathbf{x} = \{x_{it}\}_{i=1,...,N}^{t=1,...,T}$ and consequently one series for $\mathbf{y} = \{y_{it}\}_{i=1,...,N}^{t=1,...,T}$, on the basis of which the different estimation procedures and the computation of the statistics of interest can be implemented.

## Appendix C.1. Generating $u_{it}$ and $x_{it}$

Each series for $\mathbf{x}$ and $\mathbf{u}$ is built such that the (sample) values of their total variances and Within variance shares in the total variance correspond to the ones that we set beforehand. To compute those series we adopt Nerlove's approach (Nerlove 1971) and proceed in two steps.

1. First, we draw N pairs for the random vector $\mathbf{Z}_b \equiv (Z_b^x Z_b^u)'$ in the bivariate normal distribution $N(0, \Sigma_{\mathbf{Z}_b})$ with: $\Sigma_{\mathbf{Z}_b} \equiv \begin{pmatrix} \sigma_{Z_b^x}^2 & \sigma_{Z_b^x Z_b^u}^2 \\ \sigma_{Z_b^x Z_b^u}^2 & \sigma_{Z_b^u}^2 \end{pmatrix}$, $\sigma_{Z_b^x Z_b^u}^2 = \rho_{xu} \cdot \sigma_{Z_b^x}^2 \cdot \sigma_{Z_b^u}^2$; $\sigma_{Z_b^x}^2 = (1 - \theta_W) \cdot \sigma_X^2$ and $\sigma_{Z_b^u}^2 = \rho_u \cdot \sigma_u^2$.

2. Second, for each $i = 1, ..., N$, we draw T pairs for the random vector $\mathbf{Z}_w \equiv (Z_w^x Z_w^u)^T$ in the bivariate normal distribution $N(0, \Sigma_{\mathbf{Z}_w})$ with $\Sigma_{\mathbf{Z}_w} \equiv \begin{pmatrix} \sigma_{Z_w^x}^2 & 0 \\ 0 & \sigma_{Z_w^u}^2 \end{pmatrix}$ with $\sigma_{Z_w^x}^2 = \theta_W \cdot \sigma_X^2$ and $\sigma_{Z_w^u}^2 = (1 - \rho_u) \cdot \sigma_u^2$.

Then, the following variables are built:

$$ 
\begin{aligned}
x_{B_i} &= \sqrt{\sigma_{Z_b^x}^2} \cdot \frac{(z_{b_i}^x - \bar{z}_b^x)}{\sqrt{\mathrm{var}(z_b^x)}}; \quad u_{B_i} = \sqrt{\sigma_{Z_b^u}^2} \cdot \frac{(z_{b_i}^u - \bar{z}_b^u)}{\sqrt{\mathrm{var}(z_b^u)}} \\
x_{W_{it}} &= \sqrt{\sigma_{Z_w^x}^2} \cdot \frac{(z_{w_{it}}^x - \bar{z}_{w_{it}}^x)}{\sqrt{\mathrm{var}(z_{w_{it}}^x)}}; \quad u_{W_{it}} = \sqrt{\sigma_{Z_w^u}^2} \cdot \frac{(z_{w_{it}}^u - \bar{z}_{w_{it}}^u)}{\sqrt{\mathrm{var}(z_{w_{it}}^u)}} \quad i = 1, \dots, N
\end{aligned}
$$

with for $j = x, u$: $\bar{z}_b^j = \frac{1}{N} \cdot \left( \sum_{i=1}^{i=N} z_{b_i}^j \right)$, $\bar{z}_{w_{it}}^j = \frac{1}{T} \cdot \left( \sum_{i=1}^{i=T} z_{w_{it}}^j \right)$; $\mathrm{var}(z_b^j) = \frac{1}{N} \cdot \left( \sum_{i=1}^{i=N} (z_{b_i}^j - \bar{z}_b^j)^2 \right)$; $\mathrm{var}(z_{w_{it}}^j) = \frac{1}{T} \cdot \left( \sum_{i=1}^{i=N} (z_{w_{it}}^j - \bar{z}_{w_{it}}^j)^2 \right)$.

Finally we compute $x_{it}$ as $x_{it} = x_{B_i} + x_{W_{it}}$ and $u_{it}$ as $u_{it} = u_{B_i} + u_{W_{it}}$.

This design ensures that $s_X^2 = \sigma_X^2, s_u^2 = \sigma_u^2, \theta_W = \frac{x_W^2}{x_T^2}$ and $\rho_u = 1 - \frac{\mathbf{u}^T \cdot \mathbf{W} \cdot \mathbf{u}}{\mathbf{u}^T \cdot \mathbf{u}}$ with $s_X^2$ (resp. $s_u^2$) denoting the sample variance for $\mathbf{x}$ (resp. $\mathbf{u}$).

## Appendix C.2. Shaping the Experiment

We generate the different series for $\{y_{it}\}_{i=1,...,N}^{t=1,...,T}$ according to the following relationship:

$$ y_{it} = \alpha + \beta \cdot x_{it} + u_{it} \quad (A15) $$

In the simulations, we set $\alpha = \beta = 1$. We let the other parameters of the simulation vary: $N = (20, 40, 80)$, $T = (20, 40, 80)$, $\mathbf{x}_T^2 = (0.01, 1, 100)$, $\theta_W = (0.1, 0.5, 0.9)$, $\sigma_u^2 = (0.01, 1, 100)$, $\rho_{xu} = (0.1, 0.5, 0.9)$ and $\rho_u = (0.1, 0.5, 0.9)$.
## Appendix C.3. ANCOVA Results

<table><caption>**Table A2.** ANCOVA on simulation results.</caption><thead><tr><th rowspan="2"></th><th colspan="4">Dependent Variable:</th></tr><tr><th>Mean HM<sub>0</sub><sup>1</sup><br>(1)</th><th>Mean HM<sub>0</sub><sup>2</sup><br>(2)</th><th>Median HM<sub>0</sub><sup>1</sup><br>(3)</th><th>Median HM<sub>0</sub><sup>2</sup><br>(4)</th></tr></thead><tbody><tr><td>N = 40 (ref = 20)</td><td>-24.158<br>(37.475)</td><td>134.826 **<br>(56.029)</td><td>-24.132<br>(36.677)</td><td>136.294 **<br>(55.435)</td></tr><tr><td>N = 80 (ref = 20)</td><td>-72.354 *<br>(37.475)</td><td>405.306 ***<br>(56.029)</td><td>-72.281 **<br>(36.677)</td><td>409.057 ***<br>(55.435)</td></tr><tr><td>T = 40 (ref = 20)</td><td>63.206 ***<br>(16.759)</td><td>111.042 ***<br>(25.057)</td><td>60.953 ***<br>(16.402)</td><td>110.473 ***<br>(24.791)</td></tr><tr><td>T = 80 (ref = 20)</td><td>126.892 ***<br>(16.759)</td><td>306.754 ***<br>(25.057)</td><td>122.040 ***<br>(16.402)</td><td>303.316 ***<br>(24.791)</td></tr><tr><td>x<sub>T</sub><sup>2</sup> = 1 (ref = 0.01)</td><td>0.039<br>(16.759)</td><td>-1.105<br>(25.057)</td><td>0.322<br>(16.402)</td><td>-0.300<br>(24.791)</td></tr><tr><td>x<sub>T</sub><sup>2</sup> = 100 (ref = 0.01)</td><td>0.277<br>(16.759)</td><td>2.784<br>(25.057)</td><td>0.803<br>(16.402)</td><td>-0.171<br>(24.791)</td></tr><tr><td>θ<sub>W</sub> = 0.5 (ref = 0.1)</td><td>90.452 ***<br>(29.028)</td><td>-18.134<br>(43.400)</td><td>83.656 ***<br>(28.410)</td><td>-16.453<br>(42.940)</td></tr><tr><td>θ<sub>W</sub> = 0.9 (ref = 0.1)</td><td>184.362 ***<br>(29.028)</td><td>-35.323<br>(43.400)</td><td>167.161 ***<br>(28.410)</td><td>-30.374<br>(42.940)</td></tr><tr><td>ρ<sub>xu</sub> = -0.99 (ref = 0)</td><td>1083.156 ***<br>(25.600)</td><td>640.633 ***<br>(38.275)</td><td>1057.507 ***<br>(25.055)</td><td>643.296 ***<br>(37.869)</td></tr><tr><td>ρ<sub>xu</sub> = -0.9 (ref = 0)</td><td>147.213 ***<br>(25.600)</td><td>214.549 ***<br>(38.275)</td><td>141.792 ***<br>(25.055)</td><td>202.157 ***<br>(37.869)</td></tr><tr><td>ρ<sub>xu</sub> = -0.5 (ref = 0)</td><td>13.481<br>(25.600)</td><td>14.882<br>(38.275)</td><td>12.514<br>(25.055)</td><td>5.921<br>(37.869)</td></tr><tr><td>ρ<sub>xu</sub> = 0.5 (ref = 0)</td><td>13.436<br>(25.600)</td><td>3.664<br>(38.275)</td><td>12.469<br>(25.055)</td><td>5.878<br>(37.869)</td></tr><tr><td>ρ<sub>xu</sub> = 0.9 (ref = 0)</td><td>147.237 ***<br>(25.600)</td><td>215.027 ***<br>(38.275)</td><td>141.974 ***<br>(25.055)</td><td>201.985 ***<br>(37.869)</td></tr><tr><td>ρ<sub>xu</sub> = 0.99 (ref = 0)</td><td>1083.935 ***<br>(25.600)</td><td>641.078 ***<br>(38.275)</td><td>1058.341 ***<br>(25.055)</td><td>643.762 ***<br>(37.869)</td></tr><tr><td>σ<sub>u</sub><sup>2</sup> = 1 (ref = 0.01)</td><td>-0.265<br>(16.759)</td><td>3.723<br>(25.057)</td><td>0.343<br>(16.402)</td><td>0.056<br>(24.791)</td></tr><tr><td>σ<sub>u</sub><sup>2</sup> = 100 (ref = 0.01)</td><td>0.400<br>(16.759)</td><td>0.780<br>(25.057)</td><td>1.234<br>(16.402)</td><td>-0.119<br>(24.791)</td></tr><tr><td>ρ<sub>u</sub> = 0.5 (ref = 0.1)</td><td>90.544 ***<br>(29.028)</td><td>-20.710<br>(43.400)</td><td>83.885 ***<br>(28.410)</td><td>-15.796<br>(42.940)</td></tr><tr><td>ρ<sub>u</sub> = 0.9 (ref = 0.1)</td><td>184.478 ***<br>(29.028)</td><td>-31.878<br>(43.400)</td><td>167.171 ***<br>(28.410)</td><td>-29.092<br>(42.940)</td></tr><tr><td>N = 40: θ<sub>W</sub> = 0.5</td><td>86.977 **<br>(41.052)</td><td>-16.080<br>(61.376)</td><td>87.205 **<br>(40.177)</td><td>-15.864<br>(60.726)</td></tr><tr><td>N = 80: θ<sub>W</sub> = 0.5</td><td>261.702 ***<br>(41.052)</td><td>-41.165<br>(61.376)</td><td>262.250 ***<br>(40.177)</td><td>-48.630<br>(60.726)</td></tr><tr><td>N = 40: θ<sub>W</sub> = 0.9</td><td>175.791 ***<br>(41.052)</td><td>-27.656<br>(61.376)</td><td>176.433 ***<br>(40.177)</td><td>-30.434<br>(60.726)</td></tr><tr><td>N = 80: θ<sub>W</sub> = 0.9</td><td>525.795 ***<br>(41.052)</td><td>-89.808<br>(61.376)</td><td>526.255 ***<br>(40.177)</td><td>-92.123<br>(60.726)</td></tr><tr><td>N = 40: ρ<sub>u</sub> = 0.5</td><td>86.826 **<br>(41.052)</td><td>-13.059<br>(61.376)</td><td>86.837 **<br>(40.177)</td><td>-16.015<br>(60.726)</td></tr><tr><td>N = 80: ρ<sub>u</sub> = 0.5</td><td>261.064 ***<br>(41.052)</td><td>-45.820<br>(61.376)</td><td>261.054 ***<br>(40.177)</td><td>-48.512<br>(60.726)</td></tr><tr><td>N = 40: ρ<sub>u</sub> = 0.9</td><td>175.736 ***<br>(41.052)</td><td>-30.548<br>(61.376)</td><td>176.043 ***<br>(40.177)</td><td>-31.087<br>(60.726)</td></tr><tr><td>N = 80: ρ<sub>u</sub> = 0.9</td><td>526.388 ***<br>(41.052)</td><td>-84.972<br>(61.376)</td><td>526.704 ***<br>(40.177)</td><td>-92.531<br>(60.726)</td></tr><tr><td>Constant</td><td>-446.938 ***<br>(35.552)</td><td>-246.347 ***<br>(53.154)</td><td>-430.229 ***<br>(34.795)</td><td>-246.886 ***<br>(52.590)</td></tr><tr><td>Observations</td><td>5103</td><td>5103</td><td>5103</td><td>5103</td></tr><tr><td>R<sup>2</sup></td><td>0.580</td><td>0.165</td><td>0.579</td><td>0.169</td></tr><tr><td>Adjusted R<sup>2</sup></td><td>0.578</td><td>0.161</td><td>0.577</td><td>0.165</td></tr><tr><td>Residual Std. Error (df = 5076)</td><td>488.758</td><td>730.740</td><td>478.346</td><td>722.994</td></tr><tr><td>F Statistic (df = 26; 5076)</td><td>269.238 ***</td><td>38.691 ***</td><td>268.675 ***</td><td>39.743 ***</td></tr></tbody></table>

Note: * p < 0.1; ** p < 0.05; *** p < 0.01.
<figure><img src="image_7.png" /><figcaption>Figure A1. Distribution of the proportion of negative values of $HM_O^2$, $N = 80$, $T = 80$, $s_X^2 = \sigma_u^2 = 1$.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Figure A2. Power of $HM_O^2$, $T = 80$, $s_X^2 = \sigma_u^2 = 1$.</figcaption></figure>
## Appendix D. Regression Outcomes in the Single Regressor Case for the Motivating Example 2 [Airline]

<table><caption>Table A3. Estimation results for Motivating example 2, Airline, single covariate.</caption><thead><tr><th>Specification</th><th></th><th>Intercept</th><th>log[fuelprice]</th></tr></thead><tbody><tr><td rowspan="2">Within specification</td><td>Coef.</td><td>—</td><td>0.7785</td></tr><tr><td>Std Err.</td><td>—</td><td>0.0279</td></tr><tr><td rowspan="2">Between specification</td><td>Coef.</td><td>476.260</td><td>-36.248</td></tr><tr><td>Std Err.</td><td>136.439</td><td>10.684</td></tr><tr><td rowspan="3">Random effect specification</td><td>Coef.</td><td>3.4264</td><td>0.7783</td></tr><tr><td>Std Err. 1</td><td>0.4245</td><td>0.0279</td></tr><tr><td>Std Err. 2</td><td>0.4502</td><td>0.0296</td></tr><tr><td>HM<sub>O</sub><sup>1</sup></td><td>12.0100</td><td></td><td></td></tr><tr><td>HM<sub>O</sub><sup>2</sup></td><td>-0.0006</td><td></td><td></td></tr><tr><td>σ̂<sub>ε</sub><sup>2</sup></td><td>0.0456</td><td></td><td></td></tr><tr><td>σ̂<sub>ξ</sub><sup>*2</sup></td><td>0.0513</td><td></td><td></td></tr><tr><td>ψ<sup>2</sup></td><td>0.0095</td><td></td><td></td></tr><tr><td>h</td><td>1.1251</td><td></td><td></td></tr><tr><td>h<sup>*</sup></td><td>1.0000</td><td></td><td></td></tr><tr><td>2·h<sup>*</sup>-1</td><td>1.0000</td><td></td><td></td></tr><tr><td>Within variance</td><td></td><td></td><td>0.6521</td></tr><tr><td>Between variance</td><td></td><td></td><td>0.0005</td></tr><tr><td>Within variance/Total variance (in %)</td><td>θ<sub>W</sub></td><td></td><td>99.9282</td></tr><tr><td>Between variance/Total variance (in %)</td><td>θ<sub>B</sub></td><td></td><td>0.0718</td></tr></tbody></table>

## Notes

1. Schreiber (2008), based on Holly (1982), examines cases in which this problem can arise even asymptotically, when the alternative hypothesis is true.

2. In particular, this issue is generally not addressed in the leading textbooks in panel data econometrics. An exception is Wooldridge (2010), (chp. 10, pp. 289–90), but he merely mentions the possibility of obtaining a non-positive definite covariance matrix if different estimates of the error term variance are used, suggesting a way out, which we further discuss below.

3. See Nerlove (1971) and Fuller and Battese (1973), for an original exposition of the transformed, quasi-demeaned model and the related approach.

4. Schreiber (2008) also considers a panel data framework as an illustration for the asymptotic results and highlights cases where the matrix is not SPD in a context where the error term variance estimates differ. He does not, however, focus on the comparison of the different estimation approaches in the random effects model and their implications for the computation of the Hausman test statistic, as we do.

5. We assume in what follows that there is no time-invariant regressor in $X_{it}$, so that it is possible to compute the $\beta$-estimator with the Within transformation of $X_{it}$ (see below).

6. See the initial study by Baltagi and Griffin (1973). The dataset is available at: https://www.wiley.com/legacy/wileychi/baltagi/datasetlist5.html, accessed on 2 May 2023.

7. Interestingly, in an updated version of his textbook, Baltagi (2021) modified the presentation of the Gasoline case study compared to the one provided in 2005 and presented here. In this update, there is no more disconnection between the two versions of the statistic, and only one version is considered, $HM_O^1$. While, in both presentations, the estimations are drawn from the STATA software package, the second presentation benefits from the use of the *sigmapless* option command that fixes the computation of the estimator for the idiosyncratic component of the error term. See *infra* in Section 4.2.

8. The original study is from Greene (1999). The dataset is available at: http://pages.stern.nyu.edu/~wgreene/Text/tables/tablelist5.htm, accessed on 2 May 2023.

9. The dataset is available at: http://pages.stern.nyu.edu/~wgreene/Text/Edition7/tablelist8new.htm, accessed on 2 May 2023.

10. A typical *it*-observation for $y^*$ is given by $y_{it}^* = y_{it} - \hat{\theta} \cdot \bar{y}_i$, where $\theta \equiv 1 - \hat{\psi}$ and $\bar{y}_i \equiv \frac{1}{T} \left( \sum_{t=1}^{T} y_{it} \right)$. A similar transformation is applied for each of the components of $X$, hence the quasi-demeaning expression for the transformed model that is obtained in that way.

11. Indeed, $\hat{\beta}_{OLS} = (X_{**}' \cdot (I_{NT} - B_{NT}) \cdot X_{**})^{-1} \cdot (X_{**}' \cdot (I_{NT} - B_{NT}) \cdot y_{**})$, which is equivalent to (4) given the definition of $X_{**}$, $y_{**}$ and $\Omega_C^{*-1}$.
## References

Alvarez, Inmaculada C., Javier Barbero, and José L. Zofío. 2017. A Panel Data Toolbox for MATLAB. *Journal of Statistical Software* 76: 1–17. [CrossRef]

Amemiya, Takeshi. 1971. The Estimation of the Variances in a Variance-Components Model. *International Economic Review* 12: 1–13. [CrossRef]

Arellano, Manuel. 1993. On the testing of correlated effects with panel data. *Journal of Econometrics* 59: 87–97. [CrossRef]

Axler, Sheldon. 2014. *Linear Algebra Done Right*. New York: Springer.

Baltagi, Badi H. 2005. *Econometric Analysis of Panel Data*, 3rd ed. Chichester and Hoboken: J. Wiley & Sons.

Baltagi, Badi H. 2021. *Econometric Analysis of Panel Data*, 6th ed. Springer texts in Business and Economics. Cham: Springer. [CrossRef]

Baltagi, Badi H., and James M. Griffin. 1973. Gasoline demand in the oecd: An application of pooling and testing procedures. *European Economic Review* 22: 626–32. [CrossRef]

Baltagi, Badi H., and Long Liu. 2007. Alternative ways of obtaining Hausman’s test using artificial regressions. *Statistics & Probability Letters* 77: 1413–17. [CrossRef]

Baum, Christopher F., Mark E. Schaffer, and Steven Stillman. 2003. Instrumental Variables and GMM: Estimation and Testing. *The Stata Journal: Promoting Communications on Statistics and Stata* 3: 1–31. [CrossRef]

Cameron, Adrian Colin, and Pravin K. Trivedi. 2009. *Microeconometrics Using Stata*. College Station: Stata Press.

Cornwell, Christopher, and Peter Rupert. 2008. Efficient estimation with panel data: An empirical comparison of instrumental variable estimators. *Journal of Applied Econometrics* 3: 149–55. [CrossRef]

Croissant, Yves, and Giovanni Millo. 2008. Panel Data Econometrics in R: The plm Package. *Journal of Statistical Software* 27: 1–43. [CrossRef]

Fuller, Wayne A., and George E. Battese. 1973. Transformations for Estimation of Linear Models with Nested-Error Structure. *Journal of the American Statistical Association* 68: 626–32. [CrossRef]

Fuller, Wayne A., and George E. Battese. 1974. Estimation of linear models with crossed-error structure. *Journal of Econometrics* 2: 67–78. [CrossRef]

Greene, William. 1999. Frontier Production Functions. In *Handbook of Applied Econometrics Volume II: Microeconomics*. Edited by Pesaran M. Hashem and Schmidt Peter. Oxford: Blackwell Publishing Ltd., pp. 75–153. [CrossRef]

Greene, William. 2000. *Econometric Analysis*, 4th ed. Upper Saddle River: Prentice Hall Internat.

Greene, William. 2012. *Econometric Analysis*, 7th ed. Pearson Series in Economics. Boston and Munich: Pearson.

Hausman, Jerry A. 1978. Specification Tests in Econometrics. *Econometrica* 46: 1251–71. [CrossRef]

Hausman, Jerry A., and William E. Taylor. 1981. Panel data and unobservable individual effects. *Econometrica* 49: 1377–98. [CrossRef]

Hayashi, Fumio. 2000. *Econometrics*. Princeton: Princeton University Press.

Holly, Alberto. 1982. A Remark on Hausman’s Specification Test. *Econometrica* 50: 749–60. [CrossRef]

<footnote n="12">12 Given the definition of those matrices, this replacement relies on the use of consistent estimators for the variance components, i.e., $\sigma_{\epsilon}^2$, $\sigma_{\lambda}^2$ and/or $\sigma_{\lambda\epsilon}^2$. For a discussion about these variance component estimators, see, among others, Amemiya (1971); Fuller and Battese (1974); Maddala (1971); Nerlove (1971); Swamy and Arora (1972); Wallace and Hussain (1969).</footnote>

<footnote n="13">13 In particular, we assume that $\hat{\Omega}^*$ (resp. $\hat{\Omega}_C^*$) is a consistent estimator for $\Omega^*$ (resp. $\Omega_C^*$). See Wooldridge (2010) for a discussion on these conditions.</footnote>

<footnote n="14">14 The estimator for $\sigma_{\lambda\epsilon}^2$ is usually computed from the sum of the squares of the OLS regression residuals, $(\hat{\mathbf{u}}_B' \cdot \hat{\mathbf{u}}_B)$, for the Between (transformed) regression model with $\hat{\sigma}_{\lambda\epsilon}^2 = \frac{\hat{\mathbf{u}}_B' \cdot \hat{\mathbf{u}}_B}{N-(K+1)}$. (Swamy-Arora approach), see infra.</footnote>

<footnote n="15">15 It can be easily checked that the two approaches give rise to the same (RE) estimator for the parameters, $\alpha$ and $\beta$.</footnote>

<footnote n="16">16 The emphasis is added by us. The notation used by Hausman for the fixed-effects estimate of $\beta$ ($\hat{\beta}_{FE}$) corresponds to our $\hat{\beta}_W$.</footnote>

<footnote n="17">17 The intra-class coefficient drives the value of $\psi^2$. It can be shown, indeed, that: $\psi^2 = \frac{1-\rho_u}{1-\rho_u(1-T)}$.</footnote>

<footnote n="18">18 Note that this estimator is also used to compute $\hat{\psi}^2$ and in turn $\hat{\Omega}_C^*$, which makes it fully, logically consistent with respect to the FGLS regression model framework.</footnote>

<footnote n="19">19 This is, e.g., recommended by Cameron and Trivedi (2009), p. 360.</footnote>

<footnote n="20">20 We thank both referees for having highlighted those approaches and suggested to account for them in this discussion subsection.</footnote>

<footnote n="21">21 in this case, indeed, $\hat{\gamma} = \hat{\hat{q}}^{**}$.</footnote>

<footnote n="22">22 Baltagi and Liu show in (Baltagi and Liu 2007) that the Hausman test can be obtained equivalently from other artificial regressions, involving the use of the set of Between-transformed regressor variables, $\mathbf{X}_B$, or even the set of the initial regressor variables, $\mathbf{X}$. They also discuss the case where the auxiliary regression can accommodate the presence of potentially endogenous regressors. With respect to the issue of weak instruments in this context, see also (Staiger and Stock 1997).</footnote>

<footnote n="23">23 Take two symmetric matrices $A$ and $B$. We denote by $A \succ B$ the property according to which $A - B$ is a positive definite matrix (what we can also write as $A - B \succ 0$).</footnote>

<footnote n="24">24 If $A$ and $B$ are two symmetric positive definite matrices and are non-singular, then $A \succ B \implies B^{-1} \succ A^{-1}$.</footnote>

<footnote n="25">25 As a reminder, note that $(\tilde{\mathbf{X}}_*' \cdot \tilde{\mathbf{X}}_*) = (\mathbf{X}_W' \cdot \mathbf{X}_W) + \hat{\psi}^2 \cdot (\mathbf{X}_{B_C}' \cdot \mathbf{X}_{B_C})$.</footnote>
Maddala, Gangadharrao Soundalyara. 1971. The Use of Variance Components Models in Pooling Cross-Section and Time Series Data. *Econometrica* 39: 341–57. [CrossRef]

Mundlak, Yair. 1978. On the pooling of time series and cross section data. *Econometrics* 46: 69–85. [CrossRef]

Nerlove, Marc. 1971. A Note on Error Components Models. *Econometrica* 39: 383–96. [CrossRef]

Schreiber, Sven. 2008. The Hausman Test Statistic Can Be Negative even Asymptotically. *Jahrbücher für Nationalökonomie und Statistik* 228: 394–405. [CrossRef]

Staiger, Douglas, and James H. Stock. 1997. Instrumental Variables Regression with Weak Instruments. *Econometrica* 65: 557–86. [CrossRef]

Swamy, Paravastu Aananta Venkata Bhattandha, and Swarnjit S. Arora. 1972. The Exact Finite Sample Properties of the Estimators of Coefficients in the Error Components Regression Models. *Econometrica* 40: 261–75. [CrossRef]

Wallace, T. Dudley, and Ashiq Hussain. 1969. The Use of Error Components Models in Combining Cross Section with Time Series Data. *Econometrica* 37: 55. [CrossRef]

White, Halbert. 1982. Maximum Likelihood Estimation of Misspecified Models. *Econometrica* 50: 1–25. [CrossRef]

Wooldridge, Jeffrey M. 2010. *Econometric Analysis of Cross Section and Panel Data*, 2nd ed. Cambridge, MA: MIT Press.

**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.