Testing for Exogeneity in Cointegrated Panels

This paper proposes a test for the null that, in a cointegrated panel, the long‐run correlation between the regressors and the error term is different from zero. As is well known, in such case the OLS estimator is T‐consistent, whereas it is ‐consistent when there is no endogeneity. Other estimators can be employed, such as the FM‐OLS, that are ‐consistent irrespective of whether exogeneity is present or not. Using the difference between the former and the latter estimator, we construct a test statistic which diverges at a rate under the null of endogeneity, whilst it is bounded under the alternative of exogeneity, and employ a randomization approach to carry out the test. Monte Carlo evidence shows that the test has the correct size and good power.


I. Introduction
Consider the panel regression where t = 1,…, T , i = 1,…, N , and equation (1) is a cointegrating equation for each i. Inference on equation (1) has been studied extensively. In a seminal contribution, Phillips and Moon (1999) discuss both ordinary least squares (OLS) estimation, and estimation based on the Fully Modified version of the OLS estimator (FM-OLS henceforth). The choice between OLS and FM-OLS is driven by the presence or absence of long-run correlation between x it and e it (Phillips and Moon, 1999;Pedroni, 2000). In the former case, it is well known that the panel OLS estimator of is T -consistent, and it has a non-vanishing bias. This is in contrast with the case of no endogeneity in equation (1), where the OLS estimator is √ N T -consistent (Kao, 1999;Phillips and Moon, 1999). Consequently, empirical applications that consider panel cointegration models like equation (1) routinely employ estimation techniques that are designed to be robust to the presence of endogeneity, i.e. that yield √ N T -consistent estimates irrespective of the assumption of exogeneity holding or not. Many examples can be found e.g. in the context of testing for PPP (see e.g. Pedroni, 2001;Carlsson, Lyhagen andÖsterholm, 2007, and the references therein); in studies of employment growth and inflation (see e.g. Caporale andŠkare, 2011); in the context of the Feldstein-Horioka puzzle (see e.g. Ho, 2002); and in applications to the area of spillovers in R&D (Edmond, 2001). A frequently employed estimator is the FM-OLS; however, such estimation technique can suffer from severe problems in presence of moving average roots that are close to the unit circle (Ng and Perron, 2001), and in the case of small samples (see e.g. Breitung, 2005;Wagner and Hlouskova, 2010). Several other alternative techniques are available: examples include the Dynamic OLS estimator, developed by Saikkonen (1991) for the single equation case and by Kao and Chiang (2000) for panels; and Breitung's (2005) two stage parametric methodology. Wagner and Hlouskova (2010) assess the relative merits of various estimators through a comprehensive simulation exercise. Whilst some techniques are found to dominate across a wide variety of experiments, all estimators show poor performances when T is small. Hence, a test to find out whether long-run correlation between x it and e it is different from zero or not can be useful in order to decide whether to use a standard OLS estimator, or whether it is necessary to employ a different estimation technique.
The contribution of this paper is a test for the null hypothesis of endogeneity, i.e. for the null hypothesis that the long-run correlation between x it and e it is not equal to zero (so that OLS should not be employed). Under the alternative, there is exogeneity, and therefore OLS can be employed. The test is based on using the difference (multiplied by √ N T ) between the OLS and the FM-OLS estimators. As pointed out above, whilst the latter estimator is √ N T -consistent under both the null and the alternative hypothesis, the former has different rates under the null and the alternative hypothesis. Thus, the proposed test is similar, in spirit, to a Hausman test, in that it compares two estimators with different properties accordingly as the null or the alternative hypothesis holds. However, the test is not a Hausman test. Indeed, by construction, the difference between the two estimators multiplied by √ N T is, heuristically, a test statistic that diverges under the null hypothesis and it is bounded under the alternative. Given that the test statistic diverges under the null hypothesis, we propose a randomized testing procedure to carry out the test (Pearson, 1950;Swanson, 2002, 2006;Bandi and Corradi, 2014). A related contribution to this paper is an article by Gengenbach and Urbain (2011) see also the references therein), where an LM-type test for weak exogeneity in cointegrated panels is proposed.
Other testing approaches can also be considered, e.g. by extending tests available in the time series literature (see Ericsson and Irons, 1994). Indeed, comparisons are only partly possible, since other approaches are usually constructed to test for the null hypothesis of exogeneity, whilst our test has exogeneity as the alternative hypothesis. The purpose of our test also is slightly different, since one of its primary goals is to help choose between estimation techniques -this is also reinforced by the way in which the null hypothesis is stated in presence of heterogeneity (in the slopes or in the dynamics), as equation (24) illustrates. Notwithstanding this, the literature has developed several approaches to verify whether exogeneity is present or not. Usually, this is carried out by using some parametric model (e.g. a VECM specification), and then by formulating the null hypothesis of exogeneity based on such model -see e.g. the contributions by Gengenbach and Urbain (2011) and Moral-Benito and Serven (2013; and the references therein). Such approaches are sensitive to the correct specification of the VECM, and a less parametric testing approach such as the one proposed in this paper could be advantageous. Similarly, one may think of constructing a test directly based on estimates of the long-run covariance matrices. However, such a testing strategy relies on the quality of these estimates, which can be rather poor -see the simulations in section III. Also, the asymptotic properties of the estimator of a long-run covariance matrix under the null hypothesis that this is zero (thus, on the boundary) are likely to be non-trivial. We point out that, although the test is constructed using the FM-OLS estimator in this paper, other estimators can be employed as long as they are robust to the presence of endogeneity. Indeed, the construction and the properties of the test do not change as long as the estimator chosen is consistent under both the null and the alternative hypothesis. A primary example is the Dynamic OLS estimator. Further, the analysis in this paper is based on simplifying assumptions -mainly, the assumptions of slope homogeneity (and homogeneity of the dynamics), and of cross-sectional independence. As we point out at the end of section II, the test still is robust to the presence of heterogeneous slopes (and dynamics), and can be readily extended to contexts where cross-dependence is present, and even to the case of common stochastic trends in the regressors (see Bai, Kao and Ng, 2009, for inference in this case).
The paper is organized as follows. In section II, we discuss the test, its theoretical properties (null distribution and consistency), and its properties when our simplifying assumptions are violated. Monte Carlo simulations are in section III; section IV concludes. Proofs are in the Appendix S1.
Notation. We denote the ordinary limits as '→'; convergence in distribution as ' d →'; almost sure convergence as ' a.s. →'. We use 'a.s.' as short-hand for 'almost surely', and '≡' for definitional equality. Orders of magnitude for an almost surely convergent sequence (say s m ) are denoted as O a.s. (m ) and o a.s. (m ) when, for some " > 0 andm < ∞, P[|m − s m | < " for all m m] = 1, and m − s m → 0 almost surely. Finally, we denote the Euclidean norm as · . Other notation is introduced in the remainder of the paper.

II. The test
In this section, we spell out the notation and the main assumptions on equation (1). We then define the test statistic, and present the test asymptotics.
We start by introducing some notation, and the main assumptions. Let the data generating process (DGP henceforth) of x it (assumed to be k-dimensional) in equation (1) be given by: Let the long-run variance of e it be defined as e,i . Similarly, we define the long-run covariance and one-sided long-run covariance matrix of x it as x,i and x,i respectively; finally, we define the long-run covariance and one-sided long-run covariance between x it and e it as xe,i and xe,i respectively: The slope can be estimated using either OLS or the FM-OLS, viz.
In equation (5) xˆ xe . Equations (4)-(5) are constructed under the implicit assumption of no constant in equation (1) and no deterministics in equation (2); henceforth, we derive the main results under these restrictions for the sake of simplicity. However, both estimators can be readily modified to accommodate for the presence of deterministics in both equations (1) and (2), by using demeaned and detrended versions of y it and x it . For example, if there is a constant in the DGP of z it = (y it , x it ) , it suffices to usez it = z it − T −1 T s=1 z is ; similarly, if linear trends are present, one could employ the detrended versionz it = z it − ( T s=1 z is g s )( T s=1 g s g s ) −1 g t with g t = (1, t) , as discussed in Phillips and Moon (2000). On a similar note, in the paper we use the pooled, unweighted version of both the OLS and the FM-OLS estimators. Other variants of both estimators could also be considered, e.g. weighted or group-mean versions.
The estimates of the average long-run covariances (i.e.ˆ x ,ˆ x , etc.) are computed as follows. We define:ˆ we useê it ≡ y it −˜ i x it , with˜ i the individual equation OLS estimator. Albeit not strictly necessary under the maintained assumption of slope homogeneity, using individual estimates makes the testing procedure robust in case of (neglected) slope heterogeneity -see and particularly Proposition 1. Hence, letting (·) be a kernel with bandwidth l, we definê etc.; finally, we computeˆ all the other estimators are defined similarly. It can be noted that this approach implicitly postulates that the long-run variances are homogeneous across units. At the end of this section , we show that tests based on such estimates can still be employed even if such assumption is incorrect, and the long-run covariances are indeed heterogeneous. In order to derive the test and to study its asymptotics, we consider two assumptions, on the innovation term and on the kernel (·) respectively. Assumption 1. (a) Assumptions 6-8 and 10 in Phillips and Moon (1999) Assumption 1 is standard in the analysis of non-stationary panels, and it entails that the asymptotics for the OLS and FM-OLS estimators studied by Phillips and Moon (1999) and Pedroni (2000) holds in our context. As far as Assumption 2 is concerned, in Lemma A.1 in the Appendix S1 we show that, when estimating the average long-run covariances (e.g. when we computeˆ x ), the MSE of the estimators has a rate given by N l 2q + l T ln ln N , whence equation (12). Based on equation (12), it is possible to provide an optimal selection rule for the bandwidth l; this can be selected as l * = arg min N l 2q ln ln N + l T , which yields The test statistic Consider the following well-known properties of the OLS and the FM-OLS estimators -equations (4) and (5) respectively. For simplicity, this section only considers the case of homogeneous long-run covariances, i.e. xe,i = xe , xe,i = xe , and similarly for the others.
Consider the OLS estimatorˆ OLS . From Phillips and Moon (1999), we know that, if x ), where c is a constant whose value depends on the presence of deterministics in the DGP of y it and x it . For example, if no deterministics are present, then c = 2, whereas if a constant is present we have c = 6 as shown in Phillips and Moon (1999); similarly, it can be shown that, if a linear trend is present, c = 144, following similar passages as in Phillips and Moon (2000, Theorem 1). The test statistic proposed below in equation (16) does not depend on the value of c; thus, the test has the same properties irrespective of the presence of constants or trends in the DGPs of x it and y it .
On the other hand, when either xe = 0 or xe = 0, it holds that thus, the FM-OLS estimator is always √ N T -consistent, irrespective of the values of xe and xe . These results explain also why a Hausman-type test is fraught with difficulties: when xe = xe = 0, bothˆ FM-OLS andˆ OLS have the same asymptotic variance, thereby making the suitably normalized statistic ˆ FM-OLS −ˆ OLS degenerate. Based on these considerations, we propose different approach. We construct a test for the null hypothesis of non-zero long-run covariance, i.e.
In view of the definitions of xe and xe , it can be noted that the conditions xe = 0 or xe = 0 under the null hypothesis can be met as long as there is non-zero correlation between x it and e is , at any time horizon -which corresponds to the notion of strict exogeneity. We refer to Ericsson and Irons (1994) for a comprehensive treatment of the notion of exogeneity (see also Engle, Hendry and Richards, 1983). In our context, we note that the alternative hypothesis that xe = xe = 0 entails, from a statistical point of view that the OLS estimator is √ N T -consistent, and there is no need for a more complex estimator such as the FM-OLS estimator.
We propose the following test statistic: Based on the discussion above, under H 0 , the numerator of S NT , √ N T ˆ FM-OLS −ˆ OLS , diverges to positive infinity; on the other hand, the denominator is bounded, since the FM-OLS estimator is consistent. Under H A , both the FM-OLS and the OLS estimators are consistent, and therefore S NT is bounded.
Given that S NT diverges under the null hypothesis, we propose to use a randomized testing procedure -we refer, for details on the theory, to Pearson (1950), Swanson (2002, 2006) and Bandi and Corradi (2014), among others.
We illustrate the testing procedure as a four-step algorithm Step 1. Compute (S NT ), where (·) is a continuous, monotonic transformation with lim z→∞ (z) = +∞.
Step 2. Randomly generate an i.i.d. standard normal sample of size r, say { j } r j=1 , and define the sample Step 3. Generate the sequence { j,NT (u)} r j=1 as for all j, where u = 0 is any real number and I [·] is the indicator function. The values of u can be selected from a density (u) with compact support U = [u,ū].
Step 4. For each u ∈ U , define and compute the test statistic The transformation (·) in Step 1 is required to be continuous and unbounded at infinity. Hence, we can expect that (S NT ) approaches either positive infinity or a finite limit accordingly as H 0 or H A holds.
The main idea of the test is that, under H 0 , 1/ 2 (S NT ) × j should follow a normal distribution with mean zero and (heuristically) infinite variance as (N , T ) → ∞. This entails that, as (N , T ) → ∞ under H 0 , the random variable j,NT (u) has, for any u, a Bernoulli distribution with j,NT (u) = 1 with probability 1 2 0 with probability 1 2 (20) and Var[ j,NT (u)] = 1 4 for all j and u. Conversely, under H A , (S NT ) converges to a finite value. Therefore, 1/ 2 (S NT ) × j should (heuristically) follow a normal distribution with mean zero and finite variance, so that, for u = 0, E[ j,NT (u)] = 1 2 .

Test asymptotics
This section contains the null distribution and the consistency of the test. Let P * be the probability law of { j } r j=1 conditional on the sample, and let ' d * →' denote convergence in distribution according to P * . Results are presented for the case of slope homogeneity and homogeneous long-run covariances.
it holds that NTr d * → 2 1 a.s. conditionally on the sample. The Theorem states that, under the null hypothesis, the test statistic follows a Chisquared distribution with one degree of freedom. This holds as (N , T , r) → ∞, and under N T → 0. The latter restriction is typical in the context of panel data asymptotics (see e.g. Phillips and Moon, 1999), and it constrains the cross sectional dimension, N , to be 'smaller' than the time series dimension T .
In addition to the restriction N T → 0, the choice of r is constrained by equation (21), and therefore, by the choice of the transformation (·). We suggest using the exponential transformation, i.e. (z) = e z . Therefore, r can be chosen as a polynomial transformation of N , such as r = N . Note that the choice of r does not depend (directly) on T .
We now discuss the consistency of the test. Define c as P * [ NTr c ] = under H 0 .
Theorem 2. Let Assumptions 1 and 2 hold. Under Theorem 2 states that tests based on NTr have non-trivial power vs. H A : xe = xe = 0. In the proof we show that, under H A , # NTr (u) has a non-centrality parameter proportional to r −1 (S NT ), whence restriction (22).
Equation (22) is always satisfied when xe = xe = 0. The test has also power vs. 'local-to-null' alternatives. If (S NT ) is chosen as e S NT , equation (22) is satisfied as long as

Discussion
The test statistic S NT is based on the maintained assumptions that: (i) there is no crosssectional dependence; and (ii) the slopes in equation (1), and the long-run covariances defined in equation (3), are homogeneous across i. Although this simplifies the exposition, we point out that neither of these assumptions is necessary, and that the testing procedure proposed herein works even in the presence of cross-sectional dependence and heterogeneity. We discuss the two points separately hereafter.

Cross-sectionally dependent panels
As mentioned in the comments to Assumptions 1 and 2, it is possible to carry out tests based on S NT under less restrictive assumptions on the presence and extent of cross dependence. Indeed, all that is required in order for the test to discriminate between the null and the alternative hypotheses is to have an estimator which diverges under the null hypothesis (whilst being consistent under the alternative hypothesis; the OLS is a primary example), and another estimator which is consistent under both the null and the alternative hypothesis. Given these two estimators, tests can be constructed following exactly the same guidelines as above: the asymptotics of the test statistics is not driven by the properties of the estimators, but by the randomizing procedure. More specifically, two approaches are possible. Firstly, one could filter out the crosssectional dependence, e.g. by some defactorization method. Alternatively, estimation techniques that are robust to cross dependence could be employed. As a leading example for the latter solution, in the context of cointegrating regression with common stochastic trends, Bai et al. (2009) develop an estimation technique (the continuously updated least squares, denoted asˆ Cup ) which diverges at a rate √ N in presence of long-run correlation between x it and e it , and a bias-corrected version (ˆ CupBC ) that makes the estimator consistent. Using a test statistic based on √ N T ˆ CupBC −ˆ Cup yields exactly the same results as derived above.

Heterogeneous panels
Model (1) postulates that the slopes are homogeneous; further, in the construction of S NT , and in the presentation of the results, we have worked under the assumption that long-run covariances are also homogenous, i.e. that, in equation (3), x,i = x for all i, and similarly for all other quantities. Indeed, these restrictions are not necessary: the test can be applied, with the same null distribution and power properties, to models with heterogeneous slopes, viz. to and to the case of heterogeneous long-run variances.
In the latter case, the null and the alternative hypotheses would be modified as Equation (24) states that the average long-run covariances is equal to zero. Indeed, this condition is in line with the purpose of our test as outlined above, viz. to suggest whether one should use a standard OLS estimator, or a more complex technique (such as e.g. the FM-OLS estimator). In order to provide an intuition of the main argument, consider the case of slope homogeneity, and recall the expansion of the OLS estimation error for : N T -consistent, and there is no need to filter out the long-run covariances as the FM-OLS estimator does. This is a heuristic argument, which is based on the fact that the test statistic S NT is based on comparing the two estimators, FM-OLS andˆ OLS . If the two are found to be similar, this means thatˆ OLS can be employed. Consider the following assumption, which controls for the heterogeneity of the slopes.
are two mutually independent groups for all t. Proposition 1 summarizes the discussion above, stating that tests based on S NT have the same properties under equation (23)

III. Simulations
In this section, we consider two different exercises, using synthetic data. We firstly provide some evidence on the properties of the (unweighted pooled) FM-OLS (and, by way of comparison, of the OLS) estimator under exogeneity; this serves both as a motivation for our test, which is recommended as a tool to choose between a simple estimator (such as the OLS) and one that adjusts for endogeneity where present, and also to assess the impact of the (possibly poor) quality of either or both estimator on the properties of the test. Secondly, we verify the power and size of our test. Note that, in this section, for the sake of brevity we only consider the unweighted pooled version of the FM-OLS estimator.
We consider the following design for the DGP: Based on this, we have We consider the following combinations of ( , #): (0, 0), (0.5, 0), (0, 0.5) and (0, − 0.5). We use all combinations of (N , T ) with N = (25, 50, 100, 200) and T = (25, 50, 100, 200); in order to avoid dependence on the initial conditions (set equal to zero), we discard the first 1,000 observations. When estimating long-run covariance matrices, we use a HAC-type estimator and employ Bartlett kernel with bandwidth l selected according to equation (13); thus, for each combination of (N , T ), we have All simulated data have been computed with 2,000 replications.

The impact of the performance of the FM-OLS estimator on the test
A natural question that can arise under H A is whether the test can really work well even in those cases when the unweighted pooled verions of the FM-OLS estimator performs poorly. Estimating long-run covariances is not always an easy task, and sometimes the estimators can be severely biased, thereby marring the performance of the FM-OLS. Some, partly related evidence is also provided by the simulations in Kao and Chiang (2000), where it is shown that a weighted version of the FM-OLS estimator does reduce the bias when the long-run covariances are non-zero (as is natural to expect), but it performs poorly, and occasionally very poorly, when there is no endogeneity. The purpose of the exercise in this subsection is to shed some light on this issue, by presenting some evidence as to the properties of the OLS and FM-OLS estimators. Due to the nature of this issue, the results reported here can be evaluated with the power of the test, reported in Table 2 below.
We generate our data using equations (26)-(29), with xe = 0. We consider the following measures of performance for the FM-OLS: where MC is the number of iterations in the simulation -in our case, MC = 2,000. The former indicator represents the bias of the estimator, whereas the second is the mean square error (MSE). In addition to these classical indicators, we also consider the coverage of the 95% CI for , constructed asˆ The coverage of the confidence interval is computed as the empirical rejection frequency for the null that = 1 (the true value under the simulations), viz.
By way of comparison, we report the same indicators for the OLS estimator of , sayˆ OLS h ; in this case, the empirical rejection frequency is computed using Var(ˆ  Table 1. The table shows that the FM-OLS and the OLS have, in general, a comparable performance as far as bias and MSE are concerned. When (N , T ) increases, the OLS seems to be slightly better, but the numbers in the table are very small anyway -indeed, considering the bias, the figures in the table indicate that, in the worst case, is estimated with a percentage bias of 2.2%. Also, the theory requires N T → 0, and such restriction is not always satisfied in our simulations, which reinforces the idea that both OLS and FM-OLS perform well  (1) Table 2 (first column of each combination of ( , )).

Bias, MSE and Empirical Rejection Frequencies for the FM-OLS and the OLS estimator of in equation
as point estimates. Conversely, when considering the coverage of the nominal 95% CIs, the FM-OLS always performs poorly, and sometimes very poorly, in all cases considered, by severely underestimating the width of the confidence interval. The OLS estimator also has a tendency of understating the confidence interval, but this is less pronounced and it (slowly) vanishes as N and T increase. This can be attributed to the poor quality of the estimated variances of the two estimators, and in particular of the FM-OLS estimator: long-run variances are difficult to estimate, and unless such estimation is necessary, it is preferable to avoid it. In this respect, the test proposed in this paper could be a helpful tool to decide whether to use an estimation method based on having to estimate the long-run variances, or not. Of course, it is unrealistic to expect that having to estimate long-run variances can be completely avoided -even the OLS estimator, when e.g. carrying out t-tests, requires such estimation.
It is important to note that, despite the poor performance of the FM-OLS estimator under exogeneity, the test works very well (see Table 2 below), and it is not affected by the problems related to the estimation of the long-run variances. Indeed, the test has good power properties in all cases considered. This can be explained by considering the test statistic S NT : this is constructed using the estimatorsˆ FM-OLS andˆ OLS only, with no need for their asymptotic variance. All that the test requires is that the two estimators do not diverge to infinity, so that the test statistic S NT is bounded, regardless of the actual quality of the estimators.

Size and power of the test
We consider three sets of experiments. We firstly evaluate size and power using the DGP given by (26)-(29), which is based on equation (1) where slopes and dynamics are assumed to be homogeneous across units. In addition to this, we also evaluate size and power when the true DGP is (23), thereby introducing heterogeneous slopes; data are generated as and we generate the x it s as in equation (27). The slopes i are generated as i.i.d. N (1, 1). Further, heterogeneity in the dynamics is introduced by perturbing the Choleski factor defined in equation (28) as xe i = xe + N (0, 0.01). Finally, we consider the same DGP as in equation (37), thereby assuming heterogeneity, and we also introduce some cross-sectional dependence through a factor structure, viz.
with i and f t both i.i.d. N (0, 1). As far as the test specifications are concerned, we choose the exponential transformation, i.e. (S NT ) = e S NT . The choice of (·) will impact on the properties of the test -in particular, a transformation like the exponential one, which magnifies S NT , can be expected to reduce the probability of a Type I error. We choose r = N (unreported experiments show that altering such choice does not have a major impact on the results). Finally, we employ the test with u = 1. In general, other choices of u and also choices of the support U with more than one value do not seem to have a significant impact on the results. We point out that, as the proofs of Theorems 1 and 2 show, under the null hypothesis, the test statistic  Notes: i is generated as i.i. d. N (1, 1). The entries have the same interpretation as in Table 2, and the specifications of the test are the same also.

TABLE 4
Empirical rejection frequencies -DGP based on equations (27) has a bias that increases with the width of the support U -equation (A.13) in the Appendix S1. This bias vanishes asymptotically under equation (21); however, if U is too wide, this could lead to size distortions. On the other hand, the non-centrality parameter under the alternative hypothesis also depends on the width of U -equation (A.16) in Appendix S1. Table 2 reports empirical rejection frequencies at a 5% level for the design based on equation (26); Table 3 contains the same output, for the design based on equation (37), and Table 4 contains the empirical rejection frequencies when data are generated according to equation (38). Given the number of simulations, a 95% CI for the empirical size is 0.05 ± 2 0.05(1−0.95)

2000
[0.04, 0.06]. Consider first Table 2. We start with the power of the test, which corresponds, across all experiments, to the entries where xe = 0. In general, the test has power above 50% when N 50; we note that the power increases sharply as N increases, as predicted by the theory, and also (although in a less evident way) when T increases. The power is not sensitive to the dynamics of the error term, except for the case of negative MA roots, where the power is found to be lower, and below 50% unless N 50. Even in this case, the power increases with N (mainly) and T . Turning to the size (experiments with xe = 0.4, 0.6 and 0.8), the test has the correct size, with a slight tendency to over-reject in small samples when there is an AR root; this, however vanishes as N , and (to a lesser extent) T , increase. As far as Tables 3 and 4 are concerned, results are very similar to those in Table 2: the test has the correct size under all specifications, and it has good power properties, with the partial exception of the negative MA root case under cross dependence, where the test has power higher than 50% for N 100. The results in Tables 3 and 4, therefore, confirm the theoretical findings in Proposition 1.

IV. Conclusions
This paper addresses the issue of testing whether, in a panel cointegrating regression, there is exogeneity or not. Depending on the answer, slope estimation can be carried out using the standard OLS estimator (in case of exogeneity) or using an estimation technique that is robust to non-zero long-run correlation between regressors and errors. This issue is relevant, since although many estimators have been developed that are √ N T -consistent when exogeneity fails to hold, they often suffer from several problems, particularly with small T . We propose a test for the null hypothesis of endogeneity. The test is based on comparing two estimators, one of which is √ N T -consistent under both the null and the alternative hypothesis (in our case, the panel FM-OLS), whereas the other one is √ N Tconsistent only under the alternative hypothesis (in our case, the OLS estimator) and T -consistent under the null hypothesis. We thus construct a test statistic that diverges under the null hypothesis, whilst being bounded under the alternative hypothesis, and use it in a randomized test framework. We show, through a Monte Carlo exercise, that the test has good power properties and the correct size. The test is carried out under restrictive assumptions, such as homogeneity and cross-sectional independence, but we show that it also works in more realistic setups that allow for slope heterogeneity or dynamics in the heterogeneity, and that it can be easily modified under cross dependence. This is an interesting feature of the test: a simple test statistic is found to be robust even when the underpinning model is incorrectly specified. Thus, the test should always be carried out under the assumption of slope and dynamic homogeneity. Finally, we point out that the test itself is based on the FM-OLS estimator as a robust solution to endogeneity; however upon accepting the null hypothesis that exogeneity does not hold, different estimation techniques can be employed for the actual estimation of the slopes (e.g. the Dynamic OLS, or a different estimator belonging to the FM-OLS family).
As a final word of warning, a test is only one of the elements that should be employed to determine whether to use the OLS estimator, or some other technique that is robust to endogeneity. The outcome of the test should also be interpreted on the grounds of other considerations: if strict exogeneity is not plausible on account of prior grounds, it should be noted that carrying out inference with OLS could be pernicious, since in the presence of endogeneity the standard errors are inconsistent.