A RMT-based LM test for error cross-sectional independence in large heterogeneous panel data models*

Abstract This paper introduces a new test for error cross-sectional independence in large panel data models with exogenous regressors having heterogenous slope coefficients. The proposed statistic, LMRMT , is based on the Lagrange Multiplier (LM) principle and the sample correlation matrix of the model’s residuals. Since in large panels poorly estimates its population counterpart, results from Random Matrix Theory (RMT) are used to establish the high-dimensional limiting distribution of LMRMT under heteroskedastic normal errors and assuming that both the panel size N and the sample size grow to infinity in comparable magnitude. Simulation results show that is largely correctly sized (except for some small values of N and T). Further, the empirical size and power outcomes show robustness of our statistic to deviations from the assumptions of normality for the error terms and of strict exogeneity for the regressors. The test has comparable small sample properties to related tests in the literature which have been developed under different asymptotic theory.


Introduction
Analysis of possible cross-sectional dependence (CD) in panel data models has received renewed attention in the past decade, mainly due to the advent of increasingly large data sets that describe rich interactions among economic agents at local, regional and global level. This paper focuses on the problem of testing for error cross-sectional independence when studying a panel data specification. Two main strands of literature have been developed to address this issue. Early contributions imposed an a priori ordering of cross section units when formulating such tests. For example, Moran's test (Moran, 1948) and further extensions discussed in the spatial econometrics literature such as Ord (1973, 1981), Anselin (1988Anselin ( , 2001) and more recently Conley and Molinari (2007), depend on the choice of spatial adjacency matrix which characterizes the interconnections between these ordered units.
The second line of literature abstracts from firm assumptions about the form of the error cross section structure and makes use of the Lagrange Multiplier (LM) principle. The Breusch and Pagan (1980) LM test is an early example and is expressed as the average of squared pair-wise correlation coefficients between the errors from a panel data model with cross section dimension N and time dimension T, where N is assumed to be considerably smaller than T (T ) N).
However, in the current era of 'big data', panel data sets can easily comprise of thousands of cross section units with a considerable number of observations each, thus invalidating the above assumption of T ) N: Examples include large data sets on household income or consumption behavior, house price dynamics across neighborhoods or districts, production patterns of firms within and across industries. In settings where N is larger than T, the original LM test is biased and suffers from severe size distortions. Subsequent contributions have attempted to correct for this bias.
First, Frees (1995) provides a distribution-free statistic that does not suffer from this drawback but imposes limitations on the number of regressors that can be included in the panel data models that he considers. Next, Pesaran et al. (2008) compute exact mean and variance expressions associated with the LM statistic for the purpose of bias-adjustment, thus obtaining asymptotic normality for their modified LM adj test. For this, the sequential asymptotic where T ! 1 first, followed by N ! 1 is required. In order to improve on the sequential asymptotics of LM adj , Pesaran (2004Pesaran ( , 2015a) 1 then develops the CD test which provides favorable performance when N > T. While Pesaran (2004) assumes error independence as null hypothesis, the Pesaran (2015a) refinement sets as implicit null of the CD test weak cross-sectional dependence, as defined in Chudik et al. (2011) and further developed in Bailey et al. (2016Bailey et al. ( , 2019. This null depends on the relative expansion rates of N and T. More recently, Juodis and Reese (2021) discuss bias correction of the CD statistic in panel data models when they incorporate period-specific parameters.
Extensions of testing for error cross-sectional dependence to dynamic panel data models are more limited. Examples include the GMM approach of Sarafidis et al. (2009) applied to panels with homogeneous slope coefficients, and the LM test of Halunga et al. (2017) which studies heterogeneous panels and is robust to time series heteroskedasticity, but requires N 2 =T ! 0 when N, T ! 1 in their asymptotic theory. For a comprehensive survey and comparisons of tests for cross-sectional dependence in panel data models see Moscone and Tosetti (2009), Sarafidis and Wansbeek (2012) or Pesaran (2015b).
Implementation of the original LM test and its variants discussed above, make use of the sample correlation matrix of the residuals obtained from regressing the panel data model, R N ¼ðq ij Þ, i, j ¼ 1, 2, :::, N: As is well known from multivariate analysis, when N ( T,R N is a consistent estimator of the population correlation matrix R N ¼ ðq ij Þ: However, as the cross section dimension N increases and eventually surpasses T, this property no longer holds. This is reasonable since the error in estimating each individualq ij is of order 1=T which multiplies as the number of units N rises and can no longer be corrected with a larger time dimension once N ( T does not hold anymore. This result is established in the Random Matrix Theory (RMT) literature, which also suggests a different concept of consistency forR N to account for change in dimensionality. RMT treatsR N as a random matrix and uses the spectral and/or Frobenius norms as more appropriate metrics to achieve convergence -see for example Paul and Aue (2014), and Yao et al. (2015).
In this paper, we introduce a new LM based statistic for testing for error cross-sectional independence which we denote by LM RMT , and rely on asymptotic results from the RMT literature to establish its high-dimensional limiting distribution. It assumes that both T and N ¼ NðTÞ ! 1 and lim N=T ! c > 0, and is applied to a heterogeneous panel data model with strictly exogenous regressors, as well as normally distributed and heteroskedastic errors. Normality of the error terms is fundamental in the theoretical derivation of the statistic. To the best of our knowledge, the only other paper that utilizes random matrix theory to test for sphericity (John test) under the more restrictive homogeneous panel data setting is Baltagi et al. (2011). This contribution uses different technical derivations to our proposed statistic to obtain its limiting distribution. The follow-up LM bc test of Baltagi et al. (2012) for error cross-sectional dependence under the 1 For a published version of Pesaran (2004) see Pesaran (2021). same panel setting is closely related to the test statistic proposed by Schott (2005) and its theory does not rely on RMT.
Our Monte Carlo simulation results suggest that our LM RMT statistic is correctly sized when both N and T are large, though some size distortions are evident for small values of N and T. It performs favorably to the original LM and LM bc tests, the latter in the case of slope heterogeneity, and comparably to LM adj in terms of size and power. The CD test is universally correctly sized but lacks power under local alternatives. Finally, small sample results suggest that LM RMT is robust to non-normality in the error terms, and inclusion of temporal dynamics.
The rest of the paper is organized as follows: Section 2 sets up the model and discusses existing Lagrange Multiplier statistics that test for error cross-sectional independence. Section 3 introduces our LM test, LM RMT , and presents the main theoretical results for the statistic for a panel data model with large cross section and time dimensions. Section 4 presents a detailed Monte Carlo simulation study. Additional proofs of the lemma and theorem are provided in the Appendices.

The Lagrange multiplier test and its variant
Consider a panel data model with N units which are observed during times t ¼ 1, 2, :::, T: For each panel unit 1 i N, the response variable y obeys a regression model of type Here x it ¼ ðx 'it Þ 1 ' k is a k Â 1 vector of time-varying covariates, and b i is a k Â 1 vector of regression parameters for unit i. An individual-specific intercept can be included by setting the first element of x it to unity. Finally, u i ¼ ðu it Þ 1 t T is a sequence of regression error which is assumed to be independent and identically distributed (IID). Throughout the paper we will use the notation T k ¼ T À k: Consider the null hypothesis of cross-sectional independence H 0 : the N error vectors u 1 , :::, u N are mutually independent: This implies in particular that Covðu it , u jt Þ ¼ 0, for allt and i 6 ¼ j: To test this hypothesis, Breusch and Pagan (1980) proposed a Lagrange Multiplier (LM) statistic, as follows. For each unit i, first a regression model is fitted by ordinary least squares (OLS) producing residuals Hereb i denotes the vector of OLS estimates of regression parameters. Next, the empirical correlations between these residuals associated with the N units are obtained: Breusch and Pagan's LM statistic is given by A large value of LM indicates significance of the test. By assuming that T ! 1 while the number of units N is held fixed, LM is proved to have an asymptotic Chi-squared distribution with NðN À 1Þ=2 degrees of freedom under the null (and mild conditions on the model).
As explained in the introduction, the LM test suffers important bias distortions when T ) N does not hold: this happens for instance either when N is large or when the sample size T is small. The situation where the ratio N/T is not close enough to zero is frequent in real data analysis and we refer to it as a high-dimensional setting. In an attempt to correct for such bias, Pesaran et al. (2008) proposed a bias-adjusted LM test. Precisely, their mean-variance-biasadjusted LM test statistic is where l Tij and Tij are the mean and variance of T kq 2 ij given by and with respectively, as shown in Theorem 1 in Pesaran et al. (2008) (PUY). Under the null hypothesis and considering a sequential "T-then-N" limiting scheme where first T ! 1 and then N ! 1, they establish that the LM adj statistic is asymptotically distributed as standard normal. The main issue here is that such limiting distribution derived under the sequential"T-then-N" scheme may not be accurate enough in the high-dimensional setting considered in this paper.

High-dimensional asymptotics of the Lagrange multiplier test
It is apparent that the LM statistic (5) is connected to some N Â N sample correlation matrix. More precisely, assume that within each unit i, the errors u it are IID(0,r 2 i Þ distributed, or equivalently u it ¼ r i it with IID(0,1) random variables it ð1 t TÞ: Collect them into a T Â 1 vector r i i ¼ r i ð i1 , :::, iT Þ 0 and define the projection matrix Then the vector of OLS residuals e i ¼ ðe i1 , :::, e iT Þ 0 in (3) is Next, the empirical cross-sectional correlations (4) can be expressed asq ij ¼ e 0 i e j =ðjje i jj jje j jjÞ, where jje i jj denotes the Euclidean norm of the vector. Define the associated empirical correlation matrix,R Then clearly, By applying recent RMT results to the correlation matrixR N , we find an asymptotic normal distribution for the statistic trR 2 N under the high-dimensional setting. This asymptotic distribution is easily transferred to the LM test statistic of our interest using the identity above.

Preliminary reductions
In order to develop a rigorous central limit theorem for statistic trR 2 N , the following assumptions are needed.

Assumption (a):
The number of covariates k is fixed. Both T and N ¼ NðTÞ tend to infinity in such a way that lim N=T ! c > 0 as T ! 1: Assumption (b): Under the null hypothesis H 0 , the random errors are of the form u it ¼ r i it with some positive r i and where the N Â T array f it , 1 i N, 1 t Tg are IID standard normal random variables. Assumption (c): Within each unit i, the T Â k design matrix X i ¼ ðx i1 , :::, x iT Þ 0 is of full rank k. Assumption (d): Within each unit i, the covariates, fx it , 1 t Tg and the errors fu it , 1 t Tg are independent.
Assumption (a) defines the high-dimensional framework considered in this paper. It will soon become clear that although in theory an asymptotic limit of the ratios N/T is assumed, the limiting results can be used with the ratio at hand N/T from a given data set, without relying on the asymptotic limit c. This important fact makes the whole procedure feasible in practice. In contrast to our Assumption (a), Pesaran et al. (2008) assumes the more stringent condition discussed in the introduction, which requires that T ! 1 first, then N ! 1: Meanwhile, Pesaran (2015a) assumes an almost equivalent condition, which is T ¼ OðN Þ for some 0 < 1: In this case, the implicit null of the cross-sectional dependence test is given by 0 a < ð2 À Þ=4, or 0 a < 1=4 when N and T tend to infinity at the same rate such that T=N ! j with j being a finite positive constant.
Our Assumption (b) requires that for each unit i, u it 's are IID for all i and t, which is in line with both Pesaran et al. (2008) and Pesaran (2015a). While our Assumption (b) also requires normality of u it which is not needed in Pesaran et al. (2008), Pesaran (2015a) further assumes symmetry of the error distribution. Our normality assumption for the errors is fundamental for the derivation of our high-dimensional results. However, simulations in Section 4 confirm robustness of the test with respect to non normal errors.
Finally, our Assumptions (c) and (d) require that within each unit i, the regression vectors x it 's can exhibit time dependence but are required to be independent of the errors u it . By comparison, both Pesaran et al. (2008) and Pesaran (2015a) consider x it to be a vector of strictly exogenous regressors such that Eðu it jX i Þ ¼ 0, for all i and t.
A key step in our technical proofs is the following reduction for the residual vectors fe i g in (9): there is a T k Â 1 standard normal vector z i and a T Â T k random matrix U i with orthonomal columns, z i and T Â T k matrix U i being independent, such that To see why this claim is true, note that i are the projection matrices onto the sub-space generated by the k columns of X i , and onto its orthogonal complement, respectively. Then we can find a T Â T k matrix U i whose T k columns are orthonormal such that :::, z iT k Þ 0 has zero mean and covariance matrix r 2 i I T k : Note that despite the multiplication by U 0 i , z i is independent of U i (since its conditional distribution given U i is independent of U i ). The claim (12) is thus established.
Recall that our target is the empirical correlation matrixR N of the residuals fe i g in (10). We now rescale the residuals in order to get a normalized population with unit covariance matrix. Define so it is also the empirical correlation matrix of the v i 's. The advantage of this scaling is that the population for the v i 's is standardized as shown in the next lemma.
Moreover, its distribution is invariant under permutation of its coordinates v j . In particular, they have the same marginal distribution and The proof of this lemma is given in Appendix A.

High-dimensional limit of the LM statistic
The main theoretical result of the paper establishes the asymptotic normality of the LM statistic.  (2), where and j is given in (13).
The proof of this theorem is given in Appendix B. It is worth comparing the asymptotic normal distribution found in Theorem 3.1 and the one derived in PUY for the statistic LM adj . As mentioned earlier, from a theoretical perspective, Theorem 3.1 assumes a full double limit scheme N, T ! 1 where N, T are of comparable magnitude, while for LM adj a T-first-then-N sequential limiting scheme is used. Thus, the two asymptotic schemes are very distinct. Empirically through the simulation experiments in Section 4, we find that the two tests have comparable performance in small samples, with a slightly higher power in favor of the proposed test in some cases.

Monte Carlo simulations
We investigate the small sample properties of our proposed LM RMT statistic by use of a Monte Carlo simulation study and make comparisons with related tests in the literature. For this purpose, we consider a similar data generating process to Pesaran et al. (2008): where a i $ IIDNð1, 1Þ, k i $ IIDUð0:0, 0:4Þ, b 'i $ IIDNð1, 0:04Þ and k is the number of rhs exogenous regressors in (15) including the individual-specific intercepts. The exogenous covariates are generated as: with x 'i, À51 ¼ 0, r 2 'i ¼ s 2 'i =ð1 À 0:6 2 Þ and s 2 'i $ IIDv 2 ð6Þ=6: The first 50 observations in (16) are disregarded. The innovations in (16), 'it , are generated under two different schemes: (i) normal, IIDNð0, 1Þ, and (ii) non-normal, IIDðv 2 ð1Þ À 1Þ= ffiffi ffi 2 p : Of importance are the disturbances in (15). These are generated as: where f t $ IIDNð0, 1Þ, and r 2 i $ IIDv 2 ð2Þ=2: The factor loadings are constructed as: where t i $ IIDUð0:5, 1:5Þ, N a ½ is the integer part of N a , and parameter a determines the number of units that are significantly affected by factor f t , and ranges between zero and unity -for further details on the definition of the exponent of cross-sectional dependence, a, see Bailey et al. (2016Bailey et al. ( , 2019. Under the null hypothesis, H 0 : Covðu it , u jt Þ ¼ 0, for all t and i 6 ¼ j, which implies that a ¼ 0 and c i ¼ 0 for all i. A number of alternatives (H 1 ) can be considered which are determined by the value of the exponent, a. For values of a less than 0.5 the alternatives are local and (17) produces weakly cross-sectionally dependent errors, u it . For a > 0:5 then u it become semistrongly cross-sectionally dependent, until a ¼ 1 which is the extreme case of strong cross-sectional dependence in u it . We focus on local alternatives H 1, a with a 2 f0:2, 0:4g which make interesting comparisons with other tests, but additional values of a also can be considered. Finally, we set c ðc, kÞ ¼ 1 under both H 0 and all versions of H 1, a as well as for all k. Again, for the innovations in (17), e it , these are generated under two separate schemes: (i) normal, IIDNð0, 1Þ, and (ii) non-normal, IIDðv 2 ð1Þ À 1Þ= ffiffi ffi 2 p : In all settings, we run OLS regressions of y it on a constant, x 'it , ' ¼ 2, 3, :::, k, and y i, tÀ1 where applicable, for each i and obtain residuals e it ¼ y it Àâ i ð1 Àk i Þ À P k '¼2b'i x 'it Àk i y i, tÀ1 , witĥ a i ,k i andb 'i being estimates of a i , k i and b 'i for i and ', respectively.
We investigate the properties of our proposed one-sided test statistic, LM RMT , with its asymptotic normal distribution given in Theorem 3.1. We also consider the following test statistics in the literature: The original one-sided Lagrange Multiplier (LM) statistic of Breusch and Pagan (1980), given in (4) and (5). This is asymptotically distributed as LM $ a v 2 ðNðN À 1Þ=2Þ: The bias-adjusted version of the LM test, developed by Pesaran et al. (2008), given in (6). The LM adj statistic is a one-sided test and is distributed as LM adj $ Nð0, 1Þ: The bias-corrected LM test of Baltagi et al. (2012) which assumes a static panel data model (i.e. k i ¼ 0, for all i), homogeneous slope coefficients (i.e. b 'i ¼ b ' , for all i) and allows for heteroskedastic errors in (15). This is given by: whereq ij are the correlation coefficients corresponding to within residuals of units i and j, for i, j ¼ 1, 2, :::, N: These are denoted byt it ¼ỹ it Àx 0 itb , whereỹ it ¼ y it À 1 T P T t¼1 y it ,x it ¼ ðx 2it ,x 3it , :::, is a one-sided test and distributed as N(0, 1) under the null. Finally, the CD statistic of Pesaran (2015a): whereq ij is given by (4). CD is a two-sided test and is distributed as CD $ Nð0, 1Þ: In all experiments the values of a i , b 'i , k i , x 'it and r 2 i are drawn for each i ¼ 1, 2, :::, N and then fixed across replications. We commence with the static version of (15) where k i ¼ 0 for all i, and examine the effects of changing the number of exogenous regressors (which include individual-specific intercepts) by setting k ¼ 2, 4. 2 Additionally, we study the case where one of the exogenous regressors in (15) assumes a quadratic form, i.e. k ¼ 3 and x 3it ¼ x 2 2it where s 2 'i ¼ 0:5, for ' ¼ 2, 3, i ¼ 1, 2, :::, N: Further, we consider a homogeneous slope coefficient setting where b 'i ¼ b ' , for all i in (15) and b ' $ IIDNð1, 0:04Þ: Finally, we examine dynamic versions of (15): (i) a pure AR(1) process with individual-specific intercepts, where k i $ IIDUð0:0, 0:4Þ and b 'i ¼ 0, for all i and ', and (ii) a process with one time lag of y it , individual-specific intercepts and one exogenous regressor (i.e. k ¼ 2 plus the time lag). The combinations of sample sizes N ¼ 50, 100, 200, 500, 800, 1000 and T=N ¼ 0:5, 1:0, 2:0 are considered. The nominal size of the tests is set at the 5% significance level. All experiments are based on 2000 replications. The simulated results are listed in Table 1 and Figures 1a-3.  Breusch and Pagan (1980) and LM bc refers to the test of Baltagi, Feng and Kao (2012). 2 We have also considered the case of k ¼ 6. These results are qualitatively similar to those for k ¼ 4 and are omitted in order to save space.

Results
We commence with the baseline scenario of a static heterogeneous panel data model and consider both the exogenous regressors and error terms to be Gaussian in (15). Table 1 shows size results under this scenario for the original LM, and LM bc statistics. The LM test is clearly oversized for all (N, T) combinations, which is expected especially when N ) T: Similarly, LM bc records very high empirical size universally which again makes intuitive sense since the test has been designed for homogeneous panel models. Given the uniformly poor performance of both tests, we will omit LM and LM bc from all subsequent size and power comparisons. 3 In what follows, we concentrate on the remaining adjusted versions of LM,  (18), respectively. The number of replications is set to R ¼ 2000. LMadj stands for the test of Pesaran, Ullah Yamagata (2008) and CD corresponds the test of Pesaran (2021Pesaran ( , 2015a. 3 When considering homogeneous slope coefficients, b ' , in (15), LM bc naturally displays correct size as N ! 1, for all T, as do the remaining LM RMT , LM adj and CD tests which are based on a slope heterogeneity assumption. Results for this experiment are shown in Figure A4 of the Online Supplement.
namely LM RMT , LM adj , and the CD statistic. Figure 1a and b show size and local power results such that a ¼ 0:0, 0:2 and 0.4 in (18) for these tests under the same scenario for all (N, T) combinations, when the number of regressors (inclusive of individual-specific intercepts) is set to k ¼ 2 and 4, respectively. Focusing on size first, it is evident from the left column of Figure 1a and b that with a nominal size of p ¼ 0.05, our proposed RMT based LM test produces empirical sizes which hover around the nominal values of p ¼ 0.05 as N ! 1, for all T and irrespective of the number of regressors included in the panel data model. Some incremental size distortions can be detected when both N and T are small and as k rises. For example, the empirical size of LM RMT rises from 6.5% to 8.8% when considering combination T=N ¼ 0:5 with N ¼ 50 and when k rises from 2 to 4. This anomaly is expected when N and T take small values since random matrix theory results apply to high dimensional problems, but it disappears as T increases, for all values of N: Compared to the other tests considered, LM adj follows a near identical pattern to LM RMT for all (N, T) combinations with the exception of small sample sizes and when the number of regressors increases where it exhibits superior performance. The CD test fluctuates around the nominal size p irrespective of the values of N and T or the number of regressors, and hence outperforms LM RMT in small samples with larger k. However, performance of all tests is considered comparable under increasingly large sample settings with their empirical sizes converging to p as N rises, for all T.
Next, we turn to the middle column of Figure 1a and b which present empirical local power results when a ¼ 0:2 for the LM adjusted statistics and the CD test. Given that the departure from the null of a ¼ 0:0 is very small, the LM RMT test does not produce very high empirical power. However, as T increases the empirical power rises as N ! 1 and irrespective of the number of regressors in the model. The elevated numbers shown for T=N ¼ 0:5 for all k should be treated with care, since they correspond to the cases when size of the LM RMT tests are distorted. Compared to the LM adj test, the LM RMT statistic slightly outperforms the former but not to a great extent. However, the RMT based statistic clearly outperforms the CD test for all N, T and k. The empirical power of the CD statistic still hovers around the 5% mark throughout, which is expected since the null hypothesis for this test coincides with the assumption that 0 a < ð2 À Þ=4, where is in the range ð0, 1 and T ¼ OðN Þ: Finally, the right column of Figure 1a and b analyses the more distant alternative hypothesis of a ¼ 0:4: As N increases the empirical power for the LM RMT test tends to unity for all values of T and k. It appears that setting as alternative hypothesis a factor structure with N 0:4 ½ non-zero loadings is sufficient to achieve very high power. The performance of the LM RMT statistic is comparable to the LM adj test, which also produces empirical power tending to unity for all N, T and k combinations. Further, both LM RMT and LM adj statistics continue to outperform the CD test, which lags behind considerably.
Empirical size and power results corresponding to the scenarios when: (i) the exogenous regressors are Gaussian but the error terms are non-normally distributed, (ii) the exogenous regressors are non-normally distributed but the error terms are Gaussian, and (iii) both the exogenous regressors and error terms are non-Gaussian, are presented in Figures A1a-A1b, A2a-A2b and A3a-A3b of the Online Supplement, respectively. Results are qualitatively similar to those shown in Figure 1a and b, which implies that LM RMT is robust to departures from the Gaussianity assumption for the errors shown in Section 3. Similarly, assigning a non-linear setting by letting one of the exogenous variables in (15) take a quadratic form, produces size and power results that comply to those of the baseline scenario. These  Figure 1a. The dynamic panel data model is generated as in (15). G and NG stand for Gaussian and non-Gaussian errors, respectively. Computation of LM-adj for N ¼ 800, 1000 has been omitted for computational efficiency. are shown in Figure 2. All the above findings are not discussed in length for brevity of exposition.
It is interesting to examine the dynamic version of (15) also condisered in the simulations section of Pesaran et al (2008). Here, we focus of the size of the LM RMT and LM adj , CD tests. Assuming an AR(1) dynamic process with Gaussian errors, we obtain similar size results for the three tests to the baseline scenario under all (N, T) combinations, as shown in the first column of Figure 3. Adding an extra exogenous regressor does not alter the general pattern of size for the LM RMT and CD statistics. However, in this case LM adj becomes considerably oversized, especially when T=N ¼ 0:5 -see middle and left columns of Figure 3 where data are generated under (15) with Gaussian and non-Gaussian errors, respectively.
Overall, for practitioners interested in testing for error independence rather than weak dependence in large dimensional static panel data models where T ) N no longer holds, LM RMT and LM adj statistics are preferred, given their similar size and power performance based on the sample sizes considered in this simulation study. From a practical viewpoint, LM RMT is also comparatively computationally more efficient as N takes on very large values since it does not require computation of l Tij and Tij as in (6). 4 Outperformance of LM RMT over LM adj in terms of empirical size when considering dynamic panel data models is an interesting outcome that warrants further investigation in future research.

Conclusion
This paper proposes a new statistic for testing for error cross-sectional independence in a panel data model with strictly exogenous regressors of large cross section (N) and time (T) dimensions. The test is based on the Lagrange Multiplier principle and makes use of the pairwise sample correlation coefficients of residuals obtained by regressing the panel data model. Recognizing that in a high dimensional setting where T ) N no longer holds, the sample correlation matrix derived from the linear associations between all pairs of these N residuals is not consistent, we use results from the Random Matrix Theory literature to prove the asymptotic limit of our LM RMT statistic. This assumes that both T and NðTÞ ! 1 and N=T ! c > 0, and that the error terms are normally distributed. The small sample properties of the proposed LM RMT test are investigated by use of Monte Carlo experiments. These show that LM RMT is correctly sized for large N and for all T considered, with some size distortions for small values of N and T. The statistic shows satisfactory power under local alternatives of weak cross-sectional dependence expressed in terms of the exponent of cross-sectional dependence, a, and tends toward unity even for values of a as small as 0.4. Compared to existing related tests in the literature which have been developed under different asymptotics, LM RMT universally outperforms the original LM test which is severely oversized in high dimensional settings, and has similar size properties to the bias adjusted LM statistic and marginally better power as N rises. The CD test has universally correct size but LM RMT has superior power performance under local alternatives. The LM bc test which has been developed for homogeneous panels is severly oversized under a heterogeneous panel setting. Finally, the test is robust to inclusion of temporal dynamics. A limitation of our test statistic is the assumption that the time-varying regressors and errors are fully independent, as prescribed by the random matrix theory framework. Theoretical extensions that deal with non-normality, serial correlation or endogeneity are interesting avenues for future research.
This result is also valid for both cases ofc 1 andc > 1: The third part of lðf Þ is