Testing for correlation between the regressors and factor loadings in heterogeneous panels with interactive effects

A large literature on modelling cross-section dependence in panels has been developed through interactive effects. However, there are areas where research has not really caught on yet. One such area is the one concerned with whether the regressors are correlated with factor loadings or not. This is an important issue because if the regressors are uncorrelated with loadings, we can simply use the consistent two-way fixed effects (FE) estimator without employing any more sophisticated econometric methods such as the principal component (PC) or the common correlated effects estimators. We explore this issue, which has received surprisingly little attention and propose a Hausman-type test to address the matter. Further, we develop two nonparametric variance estimators for the FE and PC estimators as well as their difference, that are robust to the presence of heteroscedasticity, autocorrelation and slope heterogeneity. Under the null hypothesis of no correlation between the regressors and loadings the proposed test follows the χ2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\chi ^{2}$$\end{document} distribution asymptotically. Monte Carlo simulation results confirm satisfactory size and power performance of the test even in small samples. Finally, we provide extensive empirical evidence in favour of uncorrelated factor loadings. In this situation, the FE estimator would provide a simple and robust estimation strategy which is invariant to nontrivial computational issues associated with the PC estimator.


Introduction
Panel data models have been increasingly popular in applied economics and finance, due to their ability to model various sources of heterogeneity. A standard practice is to impose strong restrictions on error cross-section dependence (CSD). This takes the form of independence across individual units under the fixed effects model whilst a common time effect severely restricts the nature of CSD under the random effects specification. However, most recently, a large number of studies have developed econometric methodologies for modelling CSD, mainly through the structure of interactive effects (hereafter IE) introducing heterogeneous unobserved factors into the error components and allowing for a richer cross-sectional covariance structure.
In this framework, conventional wisdom has been that the standard two-way fixed effects (FE) estimator would be inconsistent, due to ignoring the potential endogeneity arising from the correlation between the regressors and factors and/or factor loadings (e.g. Bai 2009). Hence, two leading approaches have proposed in the literature, see Chudik and Pesaran (2015) for a survey. The first, based on the principal component (PC) estimation, estimates the factors jointly and iteratively with the main slope parameters, see Bai (2009) and Moon and Weidner (2015), Fernandez-Val and Weidner (2016) and Charbonneau (2017) for extensions. The second approach, advanced by Pesaran (2006), treats factors as nuisance terms, and removes their effects through proxying them by the cross-section averages of the dependent and independent variables. This is referred to as the common correlated effects (CCE) estimator. A growing number of extensions have been developed by Kapetanios et al. (2011), Chudik and Pesaran (2015), Westerlund and Urbain (2015) and Petrova and Westerlund (2020).
In the empirical work, the CCE estimator is mostly used as this is easier to implement with respect to the PC. Indeed, a common practice is to apply the CCE estimator after detecting the existence of strong CSD by the Pesaran (2015) CD test, see Mastromarco et al. (2016), Holly et al. (2010), Baltagi and Li (2014), among others.
This paper contributes to this literature by raising some important issues which might be considered relevant for practitioners. We start by highlighting a simple fact that the FE estimator is not always inconsistent even in the presence of IE. If the regressors are correlated with factors but uncorrelated with loadings, then the FE estimator is shown to be consistent, which has also been noted earlier by Coakely et al. (2006), Sarafidis and Wansbeek (2012) and Westerlund (2019a). In such a case, we formally show that the FE estimator is consistent and asymptotically normally distributed. But, the variance estimator provided by the standard FE estimation will be invalid due to the presence of remaining zero-mean IE in the error components. Hence, we provide two consistent nonparametric variance estimators that are robust to the presence of heteroscedastic and serially-correlated disturbances as well as the slope parameters heterogeneity. Via Monte Carlo studies, we find that FE and CCE estimators display a similar and satisfactory performance when the regressors are correlated with factors but uncorrelated with loadings. Further, the coverage rate of the FE estimator evaluated using nonparametric variance estimators reaches the nominal 95%. The performance of both CCE and FE estimators worsens significantly if the regressors are correlated with loadings, which is in line with Westerlund and Urbain (2013). As expected, the performance of the PC estimator is not unduly affected by the presence of correlation between the regressors and loadings.
Furthermore, we point out that in the specification tests that have been proposed in the literature to testing the presence of the CSD or IE, e.g. Pesaran (2015), Sarafidis et al. (2009), Bai (2009) and Castagnetti et al. (2015), the rejection of the null hypothesis does not always imply that the FE estimator is inconsistent under the alternative model with IE. For instance, Sarafidis et al. (2009) maintain an assumption that factor loadings (between equations for the dependent variable and the regressors) are uncorrelated even under the alternative. More importantly, we show that the Hausman test for the null hypothesis of the two way additive fixed effects against the alternative hypothesis of IE proposed by Bai (2009), would be inconsistent against the alternative, especially if the regressors are uncorrelated with loadings. This suggests that the presence of no correlation between the regressors and loadings emerges as an influential but under-appreciated feature of the panel data model with IE. For large T , in order to avoid any potential omitted variables bias, it is natural to allow for the regressors to be correlated with unobserved factors. But, it still remains the important issue to test whether the regressors are correlated with loadings or not in practice.
Despite a growing number of studies on modelling CSD through IE, it is rather surprising to find that the literature has been silent on investigating the important issue of testing the validity of correlation between the regressors and factor loadings in panels with IE. This is the important hypothesis to be tested because if the loadings are uncorrelated with the regressors, we can just use the simple but consistent FE estimator. In what follows we develop the Hausman-type test that determines the validity of whether the regressors are correlated with loadings. Both the FE and PC estimators are consistent under the null hypothesis of uncorrelated factor loadings whilst only the latter is consistent under the alternative hypothesis. Our proposed test is different from the Hausman test developed by Bai (2009), because our null hypothesis is subsumed under his alternative model with IE. As a result, the FE estimator is not necessarily more efficient than the PC estimator under the null hypothesis. Based on this idea, we develop two nonparametric variance estimators for the difference between the FE and PC estimators, that are shown to be robust to the presence of heteroscedasticity, autocorrelation and slope heterogeneity. We derive that the proposed test statistic follows the χ 2 distribution asymptotically. Monte Carlo simulation results confirm that the size and the power performance of the test is quite satisfactory even in small samples.
Finally, our most important contribution is the provision of extensive empirical evidence that regressors are uncorrelated with factor loadings, in many panel datasets employed in the literature. We find that the null hypothesis of the regressors being uncorrelated with factor loadings, is not rejected in thirteen out of fourteen datasets considered. Next, we find that Bai's Hausman test rejects the null of additive effects model against the alternative of IE only once whilst the CD test by Pesaran (2015) strongly rejects the null of weak CSD for all the datasets. Such conflicting results could provide an additional support for our main findings that the regressors are indeed uncorrelated with factor loadings even in cross-sectionally correlated panels with IE, in which case we show that Bai's Hausman test is inconsistent. Furthermore, the FE estimator is invariant to any complex issues related to selecting the number of unobserved factors incorrectly which would significantly affect the performance of PC estimators (Moon and Weidner 2015), and to employing the inconsistent initial estimates which may not guarantee the convergence of the iterative PC estimator (Hsiao 2018). In this regard, the FE estimation combined with nonparametric variance estimators will provide the simple and robust approach, avoiding uncertainty in specifying and estimating nuisance parameters for potential efficiency gain. This suggests that the FE estimator can still be of considerable applicability in a wide variety of cross-sectionally correlated panel data, especially if the regressors are found to be uncorrelated with factor loadings, the validity of which can be easily verified by our proposed test.
The paper proceeds as follows. Section 2 describes the model and highlights that the FE estimator is still consistent in panels with IE, under the condition that the regressors are uncorrelated with factor loadings. Section 3 develops the Hausman-type test for the validity of correlated factor loadings, which is the important hypothesis to be tested. Section 4 employs a range of Monte Carlo simulations to investigate the finite sample performance of the alternative estimators and the proposed test statistic. Section 5 presents empirical evidence documenting that the null hypothesis of the regressors uncorrelated with factor loadings, is not rejected for thirteen out of fourteen datasets. Section 6 offers some concluding remarks. Mathematical proofs, the data descriptions and additional empirical results are relegated to Appendices. Additional simulation results can be found in Online Supplement.

The model
Consider the following heterogeneous panel data model with IE: where y it is the dependent variable of the ith cross-sectional unit in period t, x it is the k × 1 vector of covariates with β i the k × 1 vector of parameters, and ε it 's are idiosyncratic errors. f t is an r × 1 vector of unobserved common factors while γ i is an r × 1 vector of random heterogeneous loadings. We make the following assumptions: it < ∞ for some δ > 0. Each ε it follows a linear process with absolutely summable autocovariances such that lim < ∞ for all t, s, and lim T , . ε it is independent of x js , γ j and f s for all i, j, s and t.
(ii) f t is covariance stationary with finite mean and variance, f with E f t 4 < ∞ where f is an r × r positive definite matrix.
(iii) γ i is iid across i with finite mean and variance, γ , where γ is an r × r positive definite matrix. γ i are independent of ε jt and f t for all i, j and t.
For a consistent estimation of the parameters in (1), we need to first account for unobserved factors, and then estimate β by applying panel estimators to (1) with defactored variables. On the basis of this idea, two popular approaches have been proposed. The common correlated effects (CCE) estimator advanced by Pesaran (2006), imposes that x it share the same factors, f t where i an r × k matrix of random heterogeneous loadings and v it are idiosyncratic errors, and proposes to approximate f t by the cross-section averages of the dependent and independent variables. Next, Bai (2009) allows x it to be arbitrarily correlated with both γ i and f t , and proposes the iterative principal component (PC) approach that estimates the factors jointly and iteratively with the slope parameters. The validity of the CCE approach depends crucially upon whether an appropriate rank condition, that has to be assumed, holds. Westerlund and Urbain (2015) argue that the issue of correctly selecting the number of factors, r in the PC estimation, is essentially the same as the issue of satisfying the condition, r ≤ k + 1 in CCE estimation. Further, it is shown that both estimators involve bias terms, which do not disappear unless N /T → 0. The finite sample performance of the two approaches has been intensively investigated. The earlier studies by Kapetanios and Pesaran (2005) and Chudik et al. (2011), provide Monte Carlo evidence in favour of the CCE estimator, which is partly due to uncertainty associated with estimating the true number of unobserved factors in the PC estimation. Further, Westerlund and Urbain (2015) show that the performance of the PC estimator is sensitive to the value of β. For β = 0, the PC estimator outperforms CCE, while for β = 0, the CCE estimator tends to outperform. However, we find that the performance of the two-way fixed effect (FE) estimator has not been widely investigated. Exceptions include the studies by Coakely et al. (2006), Sarafidis and Wansbeek (2012) and Westerlund (2019a). This simply reflects the conventional view that the FE estimator would be inconsistent in the presence of IE, due to ignoring endogeneity stemming from the correlation between regressors and factors/loadings. We aim to challenge this maintained view. For large T , suppose that f t may represent the unobserved common policy or globalisation trend, and γ i are the heterogeneous individual responses (parameters).
In practice, it is important to test the validity of whether x it are correlated with γ i or not. Formally, we set the null and alternative hypothesis as follows: Under Assumptions A(ii) and (iii), we can express γ i f t in (1) by 1 (5) in (1), we have: This transformation clearly shows that the panel data model with nonzero-mean IE, (1) can be equally expressed as the 2-way fixed effects panel data model with zero-mean IE,γ iḟ t in (6). 2 Next, applying the 2-way within transformation to (6) to obtain 3ÿ T t=1 y it , and similarly forẍ it andε it . Under Assumption A and (3), it is easily seen by the independence of γ i from all other random quantities in the model and E γ i = E γ i −γ = 0 thatẍ it is uncorrelated with the composite error,ü it =γ iḟ t +ε it in (7), provided x it are strictly 1 Hsiao (2018) argues that the assumption of zero mean for γ i or f t often used as normalization conditions, is not innocuous. With the mean zero assumption for γ i , the cross-sectional mean equation of (1) and similarly forx t andε t . Thus the least squares regression ofȳ t onx t is consistent and asymptotically normally distributed as T → ∞. Similarly, under the mean zero assumption for f t , the individual time series mean equation does not involve γ i f t , whereȳ i = T −1 T t=1 y it , and similarly forx i andε i . The least squares regression ofȳ i onx i can yield consistent and asymptotically normally distributed estimator of β if N is large. In this regard, we consider the general case with E γ i = 0 and E f t = 0. 2 This may suggest that the additive case with γ i = (α i , 1) and f t = (1, θ t + μ) may not always be the special case of the interactive effects, γ i f t , as argued by Bai (2009), because we have both 2-way effects, α i + θ t and zero-mean interactive effects,γ iḟ t in (6). 3 More precisely, we obtain: . Under the assumption that η i and x it are uncorrelated, it follows thatζ it → p 0. When evaluatingζ it numerically for the different combinations of (N , T ), say (N , T ) = {(25, 25), (50, 50), (100, 100)}, we find that its value is almost zero in all cases. exogenous with respect to ε it because See also Section 5 in Hsiao (2018). Therefore, under the null hypothesis, (3), we can apply the two-way FE estimation to (1) and obtain a consistent estimator of β from (7). Conversely, if x it and γ i are correlated, it is clear that E (ü it x it ) = 0 so that the FE estimator is inconsistent. Notice that the consistency of the FE estimator requires only γ i to be uncorrelated with x it , but this is implicitly a maintained assumption in the CCE literature. 4 A further possibility that we do not entertain is that x it contains a different set of factors to that entering y it directly and that the two sets of factors are uncorrelated. This points out the symmetry of the role of loadings and factors in the IE setting. Then, (8) may hold even if (3) does not. However, we view this setting as too unlikely to be of interest.
The two-way FE estimator of β is given bŷ (7) still contains zero-mean IE,γ iḟ t , the standard variance estimator forβ F E will be invalid. Thus, we propose the two consistent variance estimators, which are also robust to the heteroscedasticity and the serial-correlation as well as the slope heterogeneities. The first is the nonparametric variance estimator, similarly applied in deriving the variance of the CCE estimator by Pesaran (2006): Next, we consider the following heteroscedasticity and autocorrelation robust variance estimator (see CHNY): We show thatβ F E is consistent and follows the normal distribution asymptotically under the null, (3). The result holds for both homogeneous and heterogeneous β. A and under (3), as N, T → ∞,

The Hausman-type test
A number of specification tests have been proposed to test the presence of the CSD or the multiplicative IE in panels. The most popular test is the cross-section dependence (CD) test statistic proposed by Pesaran (2015), that is increasingly applied to the residuals of regression models for use as an ex-post diagnostic tool. However, the CD test fails to reject the null hypothesis of no error CSD when the factor loadings have zero means, implying that the CD test will display very poor power when it is applied to cross-sectionally demeaned data. Furthermore, the residual-based CD test has been shown to often reject the null hypothesis of no remaining CSD in the case of the CCE estimator (e.g. Mastromarco et al. 2016). Juodis and Reese (2018) show that the application of the CD test to regression residuals obtained from IE models introduces a bias term of order √ T , rendering an erroneous rejection of the null. 5 Sarafidis et al. (2009) propose an alternative testing procedure for the null hypothesis of homogeneous factor loadings against the alternative of heterogeneous loadings after estimating a linear dynamic panel data model by GMM. This approach is valid only when N is large relative to T , but it can be applied to testing for any remaining error CSD after including time dummies. But, they maintain an assumption that the loadings between equations for y and x are uncorrelated (see their Assumption 5(b)).
The PC estimator is consistent both under models with two-way additive (fixed) effects and under models with IE, but less efficient than the FE estimator under the null model with additive effects only. But, the FE estimator is inconsistent under the alternative model with IE. Following this idea, Bai (2009, Section 9) advances the following Hausman test for testing the null of additive effects, i.e. γ i f t = α i + θ t against the alternative of IE 6 : whereβ PC B is the iterative PC estimator proposed by Bai (2009) The conventional wisdom is that if the null hypothesis of no error CSD is rejected, the FE estimator would be biased due to the potential endogeneity arising from the correlation between the regressors and unobserved factors and/or loadings.
In empirical applications we apply the CD test and Bai's Hausman test to the number of datasets that have been employed in the literature, and find that the CD test strongly rejects the null hypothesis of weak error CSD while the H B test rarely rejects the null of additive-effects. The results of the CD test confirm the presence of strong CSD while the latter indicates the absence of IE. This suggests that the FE estimator is consistent (and potentially efficient). However, if the regressors are uncorrelated with loadings, the H B test is inconsistent against the alternative model.
The results of the Monte Carlo simulation (in Section S1 in the Online Supplement) clearly demonstrate the limitation of applying the H B in practice because it cannot 5 Nonetheless, the CD test may be used as a model-selection tool, with a reduction in the absolute value of the CD test statistic typically being interpreted as an indication of an improved model specification. 6 Focusing on the special cases, Castagnetti et al. (2015) propose two tests for the null of no factor structure: one for the null that factor loadings are cross sectionally homogeneous, and another for the null that common factors are homogeneous over time. Using extremes of the estimated loadings and common factors, they show that their statistics follow an asymptotic Gumbel distribution under the null. Furthermore, they show that the average-type statistics diverge under the null while the Hausman test is inconsistent. 7 See Sections 3.2 and 9 in Bai (2009) for details. distinguish between panels with the 2-way additive fixed effects and panels with IE where the regressors are uncorrelated with loadings. 8 The above discussion suggests that the null hypothesis of the absence of correlation between the regressors and factor loadings emerges as an influential but underappreciated feature of the panel data model with IE.
We have shown that the presence of IE does not always imply that the FE estimator is inconsistent. In particular, the FE estimator is still consistent under the null (3), even though the regressors are correlated with factors. In this case we may prefer to use the simple FE estimator, which is invariant to any complex issues related to selecting the number of unobserved factors incorrectly which would significantly affect the performance of PC estimators (Moon and Weidner 2015), and to employing the inconsistent initial estimates which may not guarantee the convergence of the interactive PC estimator (Hsiao 2018).
In this regard, it is surprising to find that the literature has been silent on investigating the important issue of testing if the regressors are correlated with loadings or not in panels with IE. For large T context, it is natural to allow for x it to be correlated with f t to avoid any omitted variables bias. It still remains the important issue to test whether x it are correlated with γ i . Given the pervasive evidence of cross sectionally dependent errors in panels (Pesaran 2015), as the main contribution, we proceed to develop a novel Hausman-type test that investigates the validity of the null hypothesis, (3). In the model (1), recall that the PC estimator is consistent under the null, (3) and under the alternative, (4) whereas the FE estimator is consistent only under the null, (3). Following this idea, we propose the Hausman-type test based on the difference between the FE and PC estimators as follows: whereβ PC is the bias corrected PC estimator to be defined in (18) below, and Notice that the FE estimator is not necessarily more efficient than the PC estimator under the null, which implies that in contrast to the well-established finding in Hausman (1978). Hence, our proposed test is not exactly the Hausman test. We interpret the Hausman-type test in (17) as a test for the null hypothesis, (3) in heterogeneous panels with IE, (1). Before developing the asymptotic theory for the Hausman-type statistic, we describe the asymptotic distribution of the bias-corrected PC estimator given bŷ where theβ PC is the PC estimator obtained by iteratively solving the set of nonlinear equations:β , V N T is the diagonal matrix that consists of the r largest eigenvalues of the above matrix in the brackets arranged in a decreasing order, F is √ T times the corresponding eigenvectors, and 1 NB N T and 1 TĈ N T are the bias correction terms derived in CHNY (see Appendix 9 for details).
Next, similar to the nonparametric and HAC variance estimators developed for the FE estimator, we propose two versions of the robust variance estimator for the PC estimator as follows 9 We provide the asymptotic distribution of theβ PC estimator in Theorem 2.

Theorem 2 Suppose that Assumption A holds. Considering, β
It is worth noting in the homogeneous case with β i = β for all i that while the FE estimator is √ N -consistent, the PC estimator can achieve a faster rate of convergence as it completely removes the effect of the unobserved factors, asymptotically. Further, the rate of convergence of the FE estimator is also shared by the CCE estimator, if the rank condition in Pesaran (2006) does not hold. Such condition cannot be ascertained but needs to be assumed, in which case the FE and CCE estimators have comparable theoretical properties. Nevertheless, the superiority of the PC estimator does not necessarily extend to its small sample properties as we examine in Monte Carlo study below.
Having established that the two versions of the robust estimator can consistently standardise the estimator, we propose to estimate Cov β F E ,β PC by 10 Accordingly, we define two operating versions of the Hausman-type statistic by We provide the main result in the following Theorem.

Theorem 3 Under Assumption A, as N, T → ∞,
This follows from the use of the robust covariance estimators that properly normalise the test statistic as shown in Appendix 7.
Next, notice that our proposed test, (17), is fundamentally different from Bai's Hausman test, (16), because our null hypothesis, (3) is subsumed under his alternative model with IE, as is clearly demonstrated in (6). Furthermore, Bai's test will be consistent only if the regressors are correlated with both factors and loadings. Importantly, Bai's Hausman test will be inconsistent if x it are uncorrelated with γ i in (1), which is mainly because the FE estimator is still consistent under (3). This suggests that the non-rejection of the null by the Bai's test is not informative because it cannot distinguish between the panel data model with the 2-way additive fixed effects only and the model with IE where the regressors are uncorrelated with loadings. See the Online Supplement for the simulation evidence. In the empirical applications below we find that Bai's Hausman test rarely rejects the null of additive effects model against the alternative of IE even though the CD test strongly rejects the null of weak CSD for all the datasets. Such conflicting results may suggest that the regressors are indeed uncorrelated with factor loadings even in the panels with IE, which could provide the support for the usefulness of our proposed test. Westerlund and Urbain (2013) find that the CCE estimator does not perform well in the presence of correlated factor loadings, especially if the full rank condition is not satisfied. Karabiyik et al. (2017) discuss the role of the rank condition in the CCE estimation, and show that the second moment matrix of the estimated factors becomes asymptotically singular if the number of factors is strictly less than the number of dependent and independent variables, invalidating the key arguments commonly applied to establish the asymptotic theory. Westerlund and Urbain (2015) provide a formal comparison between the CCE and PC estimators by employing the same data generating process (DGP) 11 and show that the two estimators are asymptotically equivalent only if N /T → 0 whereas their asymptotic distributions are no longer equivalent if N /T → τ > 0, especially in terms of asymptotic biases.

Review of previous studies
Though a number of papers have examined the small sample performance of the CCE and PC estimators, we find that only two studies by Sarafidis and Wansbeek (2012) and Westerlund (2019a), have explicitly analysed the performance of the FE estimator in the presence of CSD. Assuming the homogeneous parameters with N = 100 and T = 50, Sarafidis and Wansbeek (2012) compare the performance of the FE, CCE and PC estimators. If the factor loadings between the equations for y and x are uncorrelated and the rank condition is satisfied, they find that all three estimators perform well in terms of bias and RMSE. If the factor loadings are correlated, however, the FE estimator is severely biased. The CCE estimator is substantially biased if the rank condition is violated. As expected, the performance of the PC estimator is not significantly affected by the presence of correlated factor loadings.
Recently, Westerlund (2019a) shows that the FE estimator can be consistent even in the presence of IE, because both FE and CCE estimators belong to a class of estimators that satisfy a zero sum restriction. But, he maintains the assumption that factor loadings are uncorrelated in which case he demonstrates that the performance of the FE and CCE estimators is satisfactory.

Monte Carlo design
We generate the data as follows: where ( f 1t , f 2t , ε it , u it ) are drawn from the multivariate normal distribution with zero means and covariance matrix, We follow Pesaran (2006) and Westerlund and Urbain (2013), and generate the factor loadings, (γ 1i , γ 2i ) and ( 1i , 2i ) as follows: • Experiment 1 with uncorrelated factor loadings and the full rank in which case • Experiment 2 with uncorrelated factor loadings and the rank deficiency in which • Experiment 3 with correlated factor loadings and the full rank in which case: 1i 12 = 1 0 2 1 • Experiment 4 with correlated factor loadings and the rank deficiency in which We specify the main slope parameter as β i = 1 + η i , η i ∼ iid N (0, 0.04) and consider the following combination of (N , T ) = 20, 30, 50, 100, 200, setting the number of replications at R = 1, 000. 12

The small sample performance of FE, CCE and PC estimators
We examine the finite sample performance of the following estimators: the two-way fixed effect (FE) estimator,β F E , the CCE estimator by Pesaran (2006),β CC E , and the bias corrected PC estimators proposed by CHNY,β PC . We consider both pooled and mean group estimator except forβ PC (see Appendix 7 for details). Notice that consistency of the PC estimator depends crucially upon correctly selecting the number of unobserved factors (Moon and Weidner 2015). In this regard, to address uncertainty associated with the selection criteria, we initially consider the two information criteria, denoted I C p1 and AI C 1 , proposed by Bai and Ng (2002). Overall, we find that the PC estimator using I C p1 outperforms that with AI C 1 , and we only report the results based on I C p1 .
We report the following summary statistics: • Bias:β R − β 0 , where β 0 is a true parameter value andβ R = R −1 R r =1β r is the mean coefficient across R replications.
• RMSE: the root mean square error estimated by Table 1 shows the simulation results for Experiment 1 with the full rank and uncorrelated factor loadings. The biases of all estimators are mostly negligible even in small samples with the FE performing slightly worse than other estimators when N = 20. The results for RMSEs display qualitatively similar patterns. RMSEs of CCE and PC estimators are lower than those of the FE and decline as N or T grows. On the other hand, the RMSE of the FE estimator improves only with N . Finally, biases and RMSEs of the pooled and mean group estimators display almost identical patterns. The relative performance of FE, CCE and PC estimators is generally in line with the simulation results reported in Chudik et al. (2011), Sarafidis and Wansbeek (2012) and CHNY.
The important exception is the poor performance of the PC estimator using AI C 1 . 13 In this case the biases are substantial in small samples. They decline only if both N and T become large. Further, their RMSEs are much larger than those of the other estimators and decrease only if N and T are large. This demonstrates the influence of the estimated number of factors for the PC estimator. Given that information criteria have very variable performance, this is a problematic issue for PC estimators in which case the FE estimator can make an operational alternative. Table 2 presents simulation results for Experiment 2 where factor loadings are uncorrelated but the rank condition is violated. The performance of the CCE estimators tends to slightly deteriorate, both bias and RMSE of the CCE estimator are higher than in the case with the full rank. The performance of the CCE estimator improves slowly with N only, suggesting that the rank deficiency may slow down its performance. On the other hand, the bias and the RMSE of the PC and FE estimators do not appear to be affected by the rank deficiency. Finally, we find that the mean group estimator performs slightly better than the pooled estimator in small samples. Table 3 shows the results for Experiment 3 with correlated loadings and full rank. Now, only the FE estimator is severely biased. Next, the biases of the CCE estimator are not negligible for small N , but its performance improves sharply with N , a consistent finding with Westerlund and Urbain (2013), who note that 'the problem with correlated loadings goes away if the rank condition is satisfied'. The overall performance of the PC estimator is qualitatively similar to the previous cases, confirming that it is still consistent with both N and T . Table 4 presents the simulation results for Experiment 4 with correlated loadings and the rank deficiency. Both CCE and FE estimators are severely biased, confirming our theoretical prediction that both estimators are inconsistent in the presence of correlated factors loadings as also discussed in Sarafidis and Wansbeek (2012) and Westerlund and Urbain (2013). On the other hand, the performance of the PC estimators is qualitatively similar to those presented in Table 2.
Overall, our results show that, when the factor loadings are uncorrelated, all the estimators show a similar and satisfactory performance, suggesting that the FE estimator can produce reliable results even in the presence of IE. When factor loadings are correlated, however, the FE estimator becomes severely biased and the performance of the CCE estimator tends to worsen. Only under the full rank condition, the performance of the CCE improves with N . The performance of the bias-corrected PC estimator is qualitatively similar across all four experiments.

The performance of the Hausman-type test statistic
We examine the small sample performance of the H test statistics, under the above four experiments, considering the following combination of (N , T ) = 13 For a complete comparison we report the simulation results based on AI C 1 in the Online Supplement.

Table 1
Simulation results for Experiment 1 with uncorrelated loadings and the full rank CCEP and CCEMG are the pooled and mean group common correlated estimators by Pesaran (2006); FEP and FEMG denote the pooled and mean group two-way fixed effects estimators. PC is the iterative principal component estimator in CHNY. The PC estimator is bias-corrected and evaluated using the I C p1 criterion by Bai and Ng (2002)   See notes to Table 1  Table 3 Simulation results for Experiment 3 with correlated loadings and the full rank  Table 1  Table 4 Simulation results for Experiment 4 with correlated loadings and the rank deficiency See notes to Table 1  Table 5 Size and power of the H NON statistic and coverage rates at 95% level for heterogeneous βs,    14 We examine size and power of the H statistic, but we also report the coverage rates for the three estimators. We consider slope heterogeneity such as β i = β + η i , η i ∼ N (0, 0.04) and serially correlated errors given by where v ε it , v uit are drawn from the bivariate normal distribution with zero means and covariance matrix, diag σ 2 v εi , σ 2 v ui = I 2 . Hence, we examine the following two cases: Case 1: Heterogeneous βs and no serial correlation; see Tables 5 and 6. Case 2: Heterogeneous βs and serial correlation; see Tables 7 and 8. Overall, the test performance of the H statistics reported in Tables 5, 6, 7 and 8, is satisfactory and qualitatively similar in terms of the empirical size and power. This confirms that all the estimators are consistent under the null with and without serial correlation. Furthermore, the satisfactory coverage rates revealed by the three estimators demonstrate that both nonparametric and HAC variance estimators are also robust to serial correlation.

The pretest estimator
The estimated number of factors can influence the performance of the PC estimator considerably, and this issue needs to be handled carefully. The previous literature has not provided clear evidence on what is the best course of action to choose the number of factors. In this regard, we propose a pretest estimator which is constructed as follows. The pretest estimator, denotedβ pretest , selects either the FE or the PC estimator depending on the Hausman-type test results. To be more specific, we first evaluate the H N O N and H H AC statistics. If the null hypothesis, (3) is not rejected, then we selectβ pretest =β F E while, if the null is rejected, we setβ pretest =β PC .
In the Online Supplement we have examined the finite sample performance of this pretest estimator under the same four experiments considered above. Its overall performance is satisfactory in terms of bias and RMSE, irrespective of whether factor loadings are correlated or not. This suggests that such an estimator has considerable potential as it alleviates the issue of selecting the number of factors, especially in the case where the regressors are found to be uncorrelated with factor loadings in practice.

Empirical applications
We investigate the empirical relevance of the null hypothesis of no correlation between the regressors and factor loadings by applying our proposed statistics H H AC defined in (25) to fourteen datasets. 16 The details of the data and the empirical specifications are provided in Appendix 8. The Cobb-Douglas production function The first application comprises five different cases-the OECD members (N = 26, T = 41, Mastromarco et al. 2016), the 20 Italian regions (N = 20, T = 21), the 48 U.S. States (N = 48, T = 17) and the aggregate sectorial data for manufacturing from developed and developing countries (N = 25, T = 25). Following the economic growth literature, we estimate the Cobb-Douglas production function by the FE and PC estimators and then apply our proposed Hausman-type test. For OECD, the output is measured by the per capita GDP while the regressor is the capital-labour ratio. For the Italian regions, output is the per capita value added while for the U.S. application, the output is the per capita gross State product, with the same regressor. In the fourth application, the output is measured as the aggregated manufacturing sector value-added of OECD countries, see Eberhardt and Teal (2019). In the fifth application, the production function is augmented by the R&D stock expenditure, and the output is the aggregate sectorial value added for manufacturing, see Eberhardt et al. (2013). The gravity model of bilateral trade flows Next, we consider the estimation of a gravity model of the bilateral trade flows for the EU14 countries, counting N = 91 pairs from 1960 to 2008 (T = 49). Here, we follow Serlenga and Shin (2007) and estimate the gravity panel data regression, in which the bilateral trade flow is set as a function of GDP, countries' similarity, relative factor endowment, the real exchange rate as well as the trade union and common currency dummies. The gasoline demand function This application aims at estimating the price and income elasticity of gasoline demand. In particular, we focus on estimating the demand function for gasoline using the data from Liu (2014) Baltagi and Li (2014). Technological spillovers on productivity We consider two applications. First, we estimate the effects of domestic and foreign R&D on TFP controlling for the human capital. We use a balanced panel of 24 OECD countries over the period  (N = 24 and T = 34), see Coe et al. (2009) and Ertur and Musolesi (2017). In the second application we explore the channels through which technological investments affect the productivity performance of industrialised economies by estimating the productivity effects of R&D and Information and Communication Technologies (ICT), controlling for the inputs accumulation as labour and (non-ICT) capital for OECD industries. We use a balanced panel of 49 high-tech industries over the period 1977-2006 (N = 53 and T = 30) from Pieri et al. (2018). Health care expenditure and income We estimate the relationship between healthcare expenditure and income after controlling for public expenditure over total health expenditure. We consider a panel of 167 countries covering the period 1995-2012 (N = 167 and T = 18), see Baltagi et al. (2017).     Table 5 Demographic and business cycle volatility. We estimate the impact of the age composition of the labor force on business cycle volatility. We employ a balanced panel dataset for 51 countries over the period 1957-2000 (N = 51 and T = 44) provided by Everaert and Vierke (2016).

Carbon emissions and trade
We explore the nexus between carbon emissions and trade using a balanced panel of 32 OECD countries over the period 1990-2013 (N = 32 and T = 24), see Liddle (2018).
In Table 9, we present the estimation and test results. First of all, the test results by H H AC provide a surprisingly convincing evidence that the null hypothesis of the regressors being uncorrelated with factor loadings, is not rejected (even at 1% significance level) in thirteen out of fourteen datasets considered. 17 We also report the results for the CD test proposed by Pesaran (2015), which tests the null of no (weak) CSD against the alternative of strong CSD, and the Hausman test proposed by Bai (2009), H B in (16) and the Hausman test proposed by Westerlund (2019b), H W , which test the null of additive-effects against the alternative of IE. The CD test strongly rejects the null hypothesis for all the datasets whilst both H B rejects only once the null hypothesis of additive-effects model, at 10% significance level, and the H W test reject three times. These test results are rather in conflict, since the former suggests the presence of CSD while the latter suggests no IE. As highlighted in Sect. 2, however, the rejection of CD test does not always imply that the FE estimator is biased in panels with IE. Further, in Sect. 3, we show that the H B test has no power against the alternative model with IE, especially if the regressors are uncorrelated with factor loadings. Indeed, such conflicting results can provide support for our main test results that the regressors are indeed uncorrelated with factor loadings in the panels with IE.

Conclusions
A large strand of the literature on panel data has focused on analysing CSD, based on the error components model with IE, which is implicitly understood to bias the conventional two-way FE estimator, due to the potential endogeneity arising from the correlation between regressors and factors/loadings. Two main approaches have been advocated to deal with this issue: the CCE estimator by Pesaran (2006) and the PC estimator by Bai (2009).
In this paper we have shown that the panel data model with IE can be encompassed by the standard two-way error components model if the regressors are correlated with factors but uncorrelated with the loadings. This suggests that the null hypothesis of no correlation between the regressors and factor loadings emerges as an influential but under-appreciated feature of the panel data model with IE. We propose the Hausmantype test, which follows the χ 2 distribution asymptotically under the null hypothesis. Monte Carlo simulation results confirm that the size and the power of the proposed test is quite satisfactory even in small samples.
Finally, we apply the proposed tests to a number of existing panel datasets, and find strong evidence in favor of the regressors uncorrelated with factor loadings in nine of ten datasets. In this situation, the FE estimator would provide a simple and robust estimation strategy in practice by avoiding nontrivial computational issues associated with the PC estimator, the performance of which relies crucially upon applying the complex bias-corrections and using reliable information criteria correctly selecting the number of unobserved factors.
We conclude by noting a couple of avenues for future research. A natural but challenging extension is to develop the LM-type test which does not require us to estimate the PC estimator at all. Next, it is worthwhile to develop the Hausman-type test in the dynamic heterogeneous panel data model with IE.

Table 9
Empirical applications to fourteen different datasets

Conflict of interest The authors declare no conflict of interest
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Preliminary lemmas
We first provide two Lemmas that extend the Law of Large Numbers and Central Limit Theorem to cover the martingale difference sequence for the panel data. We define the concept of spatial martingale difference arrays as follows: Let W i,T for i = 1, . . . , N and T = 1, . . . , T , be arrays of matrices of random variables. Define the σ -field generated by W j,T for j = 1, . . . , N , j = i, as F −i . Then, W i,T is a spatial martingale difference array if E W i,T |F −i = 0, i = 1, . . . , N . It is clear that the resulting sequence is a martingale difference array sequence for any ordering of the random matrices W i,T .
Lemma 4 Let W i,T and μ i,T for i = 1, . . . , N and T = 1, . . . , be arrays of matrices of random variables and constants such that W i,T −μ i,T is a spatial martingale difference array where sup i,T E W i,T 1+δ < ∞ for some δ > 0. Then, as (N , T ) → j ∞, Proof By Theorem 12.11 of Davidson (1994) which is a generalisation of uniform integrability to arrays. Then, the result follows immediately by Corollary 19.9 of Davidson (1994).
Lemma 5 Let w i,T and μ i,T , for i = 1, . . . , N and T = 1, . . . , be arrays of vectors of random variables and constants such that w i,T −μ i,T is a spatial martingale difference Proof By Theorem 12.11 of Davidson (1994), if sup i,T E w i,T 2+δ < ∞, we obtain the uniform integrability condition, Together with sup N ,T N −1 N i=1 i,T < ∞, this implies that the Lindeberg condition holds by Theorem 23.18 of Davidson (1994). Then, by Theorem 23.16 of Davidson (1994), it follows that max Together with sup i,T E w i,T 2+δ < ∞, (31) implies (30) by Theorem 24.3 of Davidson (1994).

Proof of Theorem 1
Considering β i = β + η i , we havê Using Lemma 4, it is easily seen that as (N , Next, by the independence of γ i and η i each other and from X i and F across i, and using the fact that E γ i = E(η i ) = 0, it follows thatẌ i Ḟγ i +ε i is a spatial martingale difference but also a martingale difference sequence for any ordering across i. To see this, for any ordering over i, we have: which proves the martingale difference property. Notice that we repeatedly use the fact that the product of a stochastic process with a second process, that is independent over its index as well as of the first process, is a martingale difference process. Next, we note are spatial martingale difference series.

Notice that
, is of the smaller probability order of magnitude than the other two terms in the RHS of (32). Therefore, it follows that as (N , T ) → j ∞, (13) and (14). This proves (12) in Theorem 1. We will prove (15) in the proof of Theorem 3.
The results for the case of η = 0, ∀i, follows straightforwardly from the above analysis.

Proof of Theorem 2
Let R N T denote terms of the lower order of probability than the leading terms. By Theorem 6 in CHNY, considering β i = β + η i , we have: CHNY assume that x it follows a linear factor structure, (2), which can be expressed as where Using Lemmas 4 and 5, it follows that as (N , T ) →j ∞, where R 1,PC is defined in (22). This proves (21). (23) follows by the proof of Theorem 3.

Proof of Theorem 3
Given Theorems 1 and 2, it suffices to derive the equivalence and consistency of the two robust covariance estimators forβ F E andβ PC , which are given by (10), (11), (19) and (20), respectively. Rewrite them compactly as Finally, we define: To establish that the two covariance estimators are (asymptotically) equivalent, we need to show:R where R N T denotes terms of the lower order of probability than the leading terms. We focus on the PC estimator in (35). First, considerR H AC PC and notice that By Theorem 11 in CHNY, it follows that as (N , Next, it is easily seen that Then, By Theorem 11 in CHNY, we then obtain: This proves (35).
Noticing that both are iid and martingale difference processes over i and by Lemma 4, we have: This provides consistency of both variance estimators. Along similar lines to (38), it is straightforward to prove (34) and (36) because and the termẌ iḞγ i can be analysed similarly toẌ iẌ i η i . Using these results, it readily follows that (26) and (27), respectively.

Appendix: The data and empirical specifications
We describe the empirical specifications and the data in details. For the production function, we estimate the following panel data regression: The production function is augmented with R&D in the sixth application. From the data provided by Eberhardt et al. (2013), we extract a balanced panel of 82 countryindustry units representing manufacturing industries across ten OECD economies (Denmark, Finland, Germany, Italy, Japan, Netherlands, Portugal, Sweden, the United Kingdom, and the US) from 1980 to 2005. We consider an augmented Cobb-Douglas production function: where Y measured as deflated value added, L is the total number of hours worked by persons engaged, K is the total tangible assets by book value and R D is the R&D stock expenditure. See Eberhardt et al. (2013) for details. Next, we consider the gravity model specifications for the bilateral trade flows given by Here, trade it is the sum of bilateral import flows (import odt ) and export flows (export odt ) measured in million U. , and rl f it = | pgdp ot − pgdp dt | measures countries' difference in relative factor endowment where pgdp is per capita GDP. cee and euro represent dummies equal to one when countries of origin and destination both belong to the European Economic Community and share the euro as common currency, respectively. The data are collected from the IMF Direction of Trade Statistics, and covers the period, 1960-2008. We consider a sample of 91 country-pairs amongst the EU14 member countries (Austria, Belgium-Luxembourg, Denmark, Finland, France, Germany, Greece, Ireland, Italy, Netherlands, Portugal, Spain, Sweden and the U.K.).
Further, we estimate the gasoline demand function by where gasoline consumption, q it , is approximated as monthly sales volumes of motor gasoline, per capita per day; p it is the after tax gasoline prices computed by adding the state/federal tax rates to the motor gasoline sales to end user price and inc it represent the quarterly personal disposable income. Prices, income, and tax rates are converted to constant 2005 dollars using GDP implicit price deflators. The source of data is Liu (2014). Finally, we estimate the income elasticity of real house price using the specification: where p it is the housing price index and inc it is the real per capital income. We consider two annual datasets. The first sample from Holly et al. (2010)  where t f p it is the TFP, s d it is domestic R&D capital stocks, s f it is foreign R&D capital stocks and hc it is human capital. TFP is defined as the log of output minus a weighted average of labor and capital inputs; domestic and foreign R&D capital stocks are measured in U.S. $ at 2000 prices and PPP exchange rates. We use a balanced panel of 24 OECD countries (Australia, Austria, Belgium, Canada, Denmark, Finland, France, Germany, Greece, Iceland, Ireland, Israel, Italy, Japan, Korea, the Netherlands, New Zealand, Norway, Portugal, Spain, Sweden, Switzerland, the U.K. and the U.S.) observed over the period 1971-2004. The measures of TFP and R&D capital stock come from Coe et al. (2009) (source: OECD Economic Outlook) while the average number of years of schooling used to measure human capital is taken from (Ertur and Musolesi 2017).
Next, we explore the channels through which technological investment affects the productivity performance of industrialized economies using industry-level data, extracted from the EU KLEMS database and the OECD ANBERD database. The sample includes fourteen OECD countries (Austria, Belgium, Denmark, Germany, Spain, Finland, France, Ireland, Italy, Japan, Netherlands, Sweden, the UK and the US). In particular, we estimate the productivity effects of R&D and ICT identifying three channels of transmission: input accumulation, technological change and spillovers by the following specification ln(va it ) = β l ln(l it ) + β nitc ln(non I T C it ) + β itc ln(I T C it ) + β rd ln(rd it ) +e it , e it = γ i f t + ε it where va it is value added; l it is the labour input measured as the number of hours worked; rd it is the R&D input measured as the cumulative value of industry research expenses; ICT (I T C it ) and non-ICT (non I T C it ) assets are built from annual investment flows by means of the perpetual inventory method and adopting an asset-specific rate of geometric depreciation. We extract a balanced panel of 49 high-tech industries, from 1977 to 2006, from the dataset provided by Pieri et al. (2018).
Health care expenditure and income We estimate the relationship between healthcare expenditure and income using data on 167 countries over the period 1995-2012 by ln(h it ) = β gdp ln(gdp it ) + β pe ln( pe it ) + e it , e it = γ i f t + ε it where h it is per-capita health spending and gdp it is per capita GDP and pe it is publichealth expenditure rate. The data on per-capita health expenditure and per-capita GDP are expressed at constant 2005 PPP prices. The public-health expenditure rate is defined as the percentage of public expenditure over total health expenditure. The source is the World Bank and the dataset is taken from Baltagi et al. (2017). Demographic and business cycle volatility We estimate the impact of the age composition of the labor force on business cycle volatility. Jaimovich and Siu (2009) argue that a significant fraction of the run-up of US volatility in the mid-1960s and of the marked decline since the mid-1980s, known as the Great Moderation, is accounted for by long swings in the age composition of the US population induced by the baby boom and subsequent baby bust. Jaimovich and Siu (2009) define the volatile-age labor force share, s it as the fraction of the 15-to 64-year-old labor force accounted for by those aged 15-29 and 60-64 and linked it to the time-varying standard deviation of output σ it in the following benchmark regression: They show that shifts in the volatile-age share variable s it have a large and significant effect on cyclical volatility in the G7 countries from 1963 to 1999. By using a different dataset and allowing for cross-sectional dependence Everaert and Vierke (2016) find a much lower effect. Here, we use the balanced panel dataset for 51 countries over the period 1957-2000 taken from Everaert and Vierke (2016) where the GDP data (taken from the Penn World Table) are used to calculate output volatility, which is defined as the 9-year rolling standard deviation of logged annual GDP. The demographic data are taken from the United Nations World Population Prospects. Trade and carbon emissions We explore the nexus between carbon emissions and trade in the 32 OECD countries (Australia, Austria, Belgium, Canada, Chile, Czech Republic, Denmark, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Israel, Italy, Japan, Korea, Luxembourg, Mexico, the Netherlands, New Zealand, Norway, Poland, Portugal, Slovak Republic, Spain, Sweden, Switzerland, Turkey, the UK and the US). Following Liddle (2018), we estimate the following regression: co it = β gdp gdp it + β tsh tsh it + β ish ish it + β f sh f sh it + e it , e it = γ i f t + ε it where co it is the consumption-based per capita carbon emissions, gdp it the real GDP per capita, tsh it the trade (import plus export) expressed as a percentage of the GDP, ish it the industry value added expressed as a percentage of the GDP and f sh it the fossil fuel energy consumption as a share of total energy consumption. Data sources are the World Bank's World Development Indicators and the Global Carbon Project. We extract a balanced panel of 32 OECD countries from 1990 to 2013, from the dataset in Liddle (2018).

Appendix: The bias corrected PC estimator
The bias corrected estimator proposed by Cui et al. (2019) is given by where the estimator for (β PC ,F) denoted as (β PC ,F) is the solution of the set of nonlinear equations , V N T is the diagonal matrix that consists r largest eigenvalues of the above matrix in the brackets arranged in a decreasing order andF is √ T times the corresponding eigenvectors. The bias correction term is given bŷ

Appendix: Further empirical results
See Table 10.   Table 9