Determining the number of factors after stationary univariate transformations

A very common practice when extracting factors from non-stationary multivariate time series is to differentiate each variable in the system. As a consequence, the ratio between variances and the dynamic dependence of the common and idiosyncratic differentiated components may change with respect to the original components. In this paper, we analyze the effects of these changes on the finite sample properties of several procedures to determine the number of factors. In particular, we consider the information criteria of Bai and Ng (Econometrica 70(1):191–221, 2002), the edge distribution of Onatski (Rev Econ Stat 92(4):1004–1016, 2010) and the ratios of eigenvalues proposed by Ahn and Horenstein (Econometrica 81(3):1203–1227, 2013). The performance of these procedures when implemented to differentiated variables depends on both the ratios between variances and dependencies of the differentiated factor and idiosyncratic noises. Furthermore, we also analyze the role of the number of factors in the original non-stationary system as well as of its temporal and cross-sectional dimensions. Finally, we implement the different procedures to determine the number of common factors in a system of inflation rates in 15 euro area countries.


Introduction
In recent years, due to the availability of data on a vast number of macroeconomic and financial variables, there has been an increasing interest in modeling large systems of economic time series. In order to reduce the dimensionality and extract the underlying factors, one can use dynamic factor models (DFMs), originally introduced in economics by Geweke (1977) and Sargent and Sims (1977). The aim of DFMs is to represent the dynamics of the system through a small number of hidden common factors which are mainly used for forecasting and macroeconomic policy-making; see Stock and Watson (2011) and Breitung and Choi (2013), for recent reviews of the existing literature. Kajal Lahiri has contributed to the DFMs literature with several empirical works. For example, Lahiri and Yao (2004) implement a DFM to analyze the business cycle features of the transportation sector and Lahiri and Sheng (2010) to measure the forecast uncertainty by disagreement. Lahiri et al (2015) also implement a DFM to a real-time jagged-edge data set of over 160 explanatory variables to reexamine the role of consumer confidence surveys in forecasting personal consumption expenditure. The properties of many popular factor extraction procedures rely on the number of factors in the system being known. However, in practice, the number of factors is unknown and needs to be determined. Among the most popular procedures proposed with this purpose are the criteria proposed by Bai and Ng (2002), which are now standard in the literature. These criteria are based on modifications of the Akaike information criteria (AIC) and Bayesian information criteria (BIC) taking into account the cross-sectional and temporal dimensions of the dataset as arguments of the function penalizing overparametrization. Alternatively, Onatski (2010) proposes an estimator of the number of factors based on using differences between adjacent eigenvalues of the sample covariance matrix of the variables contained in the system, arranged in descending order, while Ahn and Horenstein (2013) propose two alternative estimators based on ratios of adjacent eigenvalues.
It is well known that macroeconomic time series are frequently non-stationary and possibly cointegrated. Within the context of principal components (PC) factor extraction, and following Stock and Watson (2002), the most popular way of dealing with large systems of non-stationary macroeconomic variables is by differencing the variables in a univariate fashion; see, for example, Breitung and Eickmeier (2011); Stock and Watson (2012a, b); Barhoumi et al (2013); Buch et al (2014); Moench et al (2013); Bräuning and Koopman (2014); Poncela et al (2014) and Jungbacker and Koopman (2015) for recent references. The theoretical justification of this extended practice is analyzed in Bai and Ng (2004) who show that applying PC to first-differenced data and recovering the original factors by "recumulating" is consistent regardless of whether the factors and/or idiosyncratic errors are I (0) or I (1) 1 . However, their theory proceeds assuming that the number of common factors in the system is known. On the other hand, as mentioned above, macroeconomic variables are not only non-stationary but can also be cointegrated. Differencing a cointegrated system may distort the determination of the number of factors due to the introduction of non-invertible moving average (MA) components and/or the trade-off introduced between the variances of the common and idiosyncratic components. Surprisingly, there has been little discussion in the literature on whether differencing in a univariate fashion affects the correct determination of the number of factors. As far as we know, only Bai (2004) analyzes the performance of the information criteria proposed by Bai and Ng (2002) when implemented to differenced data. In his Monte Carlo experiments, carried out for a unique DFM with contemporaneously uncorrelated idiosyncratic noises following an ARMA model and two random walk factors, he shows that the number of factors is correctly determined.
The main objective of this paper is to fill this gap by analyzing the effects of univariate stationary transformations of cointegrated systems when determining the number of factors using the approaches proposed by Bai and Ng (2002); Onatski (2010) and Ahn and Horenstein (2013). In the context of a DFM with mutually uncorrelated and homoscedastic idiosyncratic noises, we first derive analytically the eigenvalues of the covariance matrix and show how they are affected by univariate differentiation. We also carry out Monte Carlo experiments considering several designs selected to represent different situations that can be potentially encountered when dealing with the empirical analysis of real macroeconomic variables. Finally, we illustrate the results determining the number of factors in a system of prices of the euro area. It is important to note that the procedures for determining the number of factors considered in this paper are designed for what is known in the literature as static factors. Alternatively, several factor determination procedures have been proposed in the context of dynamic factors; see, for example Amengual and Watson (2007); Hallin and Liska (2007); Bai and Ng (2007); Jacobs and Otter (2008) and Breitung and Pigorsch (2013). The difference between static and dynamic factors is described by, for example, Bai and Ng (2008). They argue that, although dynamic factors can be useful to establishing the number of primitive shocks in the economy, the properties of estimated static factors are better understood from a theoretical point of view. Furthermore, we focus the analysis on procedures to detect the number of static factors as they are more popular in empirical economics.
The rest of this paper is structured as follows. In Sect. 2, we briefly describe the stationary DFM and the factor determination approaches considered. In Sect. 3, we analyze the effects of transforming non-stationary systems by univariate stationary transformations on these procedures. In Sect. 4, we report the results of the Monte Carlo experiments carried out to illustrate their finite sample performance. In Sect. 5, we carry out an empirical application. Finally, we conclude in Sect. 6.

The stationary dynamic factor model
In this section, we introduce notation and the stationary DFM and describe the factor determination procedures considered.

The model
We consider a DFM with cross-sectional dimension N , where the unobserved r < N common factors, F t = (F 1t , . . . , F rt ) , and the idiosyncratic noises, ε t = (ε 1t , . . . , ε N t ) , follow VAR(1) processes. The factors explain the common evolution of a vector of time series, Y t = (y 1t , . . . , y N t ) observed from t = 1, . . . , T . The basic DFM considered is given by where the factor disturbances, η t = (η 1t , . . . , η rt ) , are r × 1 vectors, distributed independently from the idiosyncratic noises for all leads and lags. Furthermore, η t and a t are Gaussian white noises with positive definite covariance matrices Σ η and Σ a , respectively, and P = ( p 1 , . . . , p N ) , is the N × r matrix of factor loadings, where, p i = ( p i1 , . . . , p ir ). Finally, Φ = diag(φ 1 , . . . , φ r ) and Γ are r ×r and N × N matrices containing the autoregressive parameters of the factors and the idiosyncratic components, respectively. These autoregressive matrices satisfy the usual stationarity assumptions. Furthermore, we assume that the structure of the idiosyncratic noises is such that they are weakly correlated. Following Bai and Ng (2002); Onatski (2012Onatski ( , 2015 and Ahn and Horenstein (2013), we consider the entries in P, Φ, Σ η , Γ and Σ a as fixed parameters. Jungbacker and Koopman (2015) and Alvarez et al (2016) implement the DFM in Eqs.
(1) to (3) to the data set of Stock and Watson (2005). The DFM in Eqs.
(1) to (3) is not identified because, for any r × r nonsingular matrix H , the system can be expressed in terms of a new loading matrix and a new set of common factors. A normalization is necessary to solve this identification problem and uniquely define the factors. In the context of PC factor extraction, it is common to impose the restriction P P/N = I r and F F being diagonal, where F = (F 1 , . . . , F T ) is a r × T matrix of common factors; see Stock and Watson (2002); Bai and Ng (2002, 2013; Connor and Korajczyk (2010) and Bai and Wang (2014) for papers dealing with identification issues. Note that these are normalization restrictions, and they may not have an economic interpretation.

Determining the number of factors
The DFM described above assumes that the number of factors, r , is known. However, in practice, it needs to be estimated. Obtaining the correct value of r is crucial for an adequate estimation of the space spanned by the factors. There are several alternative procedures designed to determine r in DFMs. In this paper, we consider the information criteria proposed by Bai and Ng (2002) and the estimators proposed by Onatski (2010) and Ahn and Horenstein (2013). 2 Bai and Ng (2002)

information criteria
The most popular information criteria to select the number of factors in DFMs, proposed by Bai and Ng (2002), are based on a consistent PC estimator of P and F t which is given by the solution to the following least squares problem subject to P P/N = I r and FF being diagonal, where where ε = (ε 1 , . . . , ε T ) has dimension N ×T . The solution to (4) is obtained by settinĝ P equal to √ N times the eigenvectors corresponding to the r largest eigenvalues of PC factor extraction separates the common component, P F t , from the idiosyncratic noises by averaging cross-sectionally the variables within Y t such that when N and T tend simultaneously to infinity, the weighted averages of the idiosyncratic noises converge to zero, remaining only the linear combinations of the factors. Therefore, it requires that the cumulative effects of the common component increase proportionally with N , while the eigenvalues of Σ ε = E(ε t ε t ) remain bounded; see the review of Breitung and Choi (2013) for a description of these conditions 3 . Bai (2003) proves that the PC estimators of factors, factor loadings and common components are asymptotically equivalent to the maximum likelihood estimators and, consequently, consistent. Also, he derives the rate of convergence and their corresponding limiting distributions when N and T tend simultaneously to infinity.
In order to determine r , Bai and Ng (2002) propose minimizing the following functions with respect to k, for k = 0, . . . , r max , where V k (P,F) is defined as in expression (5) with P and F t substituted by their respective PC estimates, m = min N , T and r max is a bounded integer such that r ≤ r max . The criteria in (6)  On the other hand, in the context of first-differenced data, Bai and Ng (2004) use IC 1 (k), with r max = 6. Under appropriate assumptions, Bai and Ng (2002) prove the consistency of the information criteria above to determine the number of common factors. Ifε t = Y t −PF t are the residuals of the regression of the variables in Y on the r first principal components of Using the expression of V k (P,F) in (7), the functions in (6) can be written as where g j (N , T ) is defined accordingly to the criteria in (6) for j = 1, 2 and 3.

Differenced eigenvalues
Onatski (2010) proposes an alternative procedure to select r , called edge distribution (ED), and shows that it outperforms the criteria proposed by Bai and Ng (2002) when the proportion of the variance attributed to the factors is small relative to the variance due to the idiosyncratic noises or when these are substantially correlated. Furthermore, computationally, the procedure proposed by Onatski (2010) allows the determination of the number of factors without previous estimation of the common component. Finally, it relaxes the standard assumption of PC factor extraction about the r eigenvalues ofΣ Y growing proportionally to N . Instead of requiring that the cumulative effect of factors grow as fast as N , Onatski (2010) imposes a structure on the idiosyncratic noises. Under the assumption of Normality, both cross-sectional and temporal dependence are allowed. This procedure is based on determining a sharp threshold, δ, which consistently separates the bounded and diverging eigenvalues of Σ Y . For any j > r , the differencesλ j −λ j+1 converge to 0 while the differencê λ r −λ r +1 diverges to infinity when both N and T tend to infinity. Assuming that r max /N → 0, Onatski (2010) proposes the following algorithm in order to calibrate δ and determine the number of factors: 1. Obtainλ i , i = 1, ..., N and set j = r max + 1. 2. Obtainβ as the ordinary least squares (OLS) estimator of the slope of a simple linear regression with constant, where the observations of the dependent variable are λ j , . . . ,λ j+4 and the observations of the regressor variable are {( j −1) 2/3 , . . . , 4. Set j =r + 1. Repeat steps 2 and 3 untilr converges.
Under suitable conditions, Onatski (2010) proves the consistency ofr for any fixed δ > 0. He sets the number of iterations to four although the convergence of the above algorithm is often achieved at the second iteration. Additionally, he sets r max = 8 when r = 1, 2, 5 and r max = 20 when r = 15.

Ratios of eigenvalues
Recently, Ahn and Horenstein (2013) propose two further estimators of the number of factors based on the fact that the r largest eigenvalues ofΣ Y grow unbounded as N increases, while the other eigenvalues remain bounded. They show that these estimators are less sensitive to the choice of r max than those based on the Bai and Ng (2002) information criteria. The two new estimators are defined as the value of k, for k = 0, . . . , r max , that maximizes the following ratios The value ofλ 0 has been chosen following the definition of Ahn and Horenstein (2013) according to whicĥ λ 0 → 0 and mλ 0 → ∞ as m → ∞. 4 Note that both the numerator and denominator of G R(k) are the growth rates of sums of residual variances computed with j and j + 1 factors. Ahn and Horenstein (2013) show that, contrary to the estimator proposed by Bai and Ng (2002), their estimators are not dependent on r max and suggest to chose it as min(r * max , 0.1m) where Under the same assumptions of Bai and Ng (2006) and Onatski (2010), and allowing for some variables in Y to be perfectly multicollinear or with zero idiosyncratic variances, they establish consistency of the ER(k) and GR(k) estimators. The results obtained in their Monte Carlo analysis show that the two estimators outperform the Bai and Ng (2002) information criteria and Onatski (2010) estimator mainly when the idiosyncratic components are simultaneously cross-sectionally and serially correlated. However, the estimator proposed by Onatski (2010) outperforms the ER(k) and GR(k) ratios when the variance of the idiosyncratic component is larger than that of the common component (weak factors).

A note on the convergence of eigenvalues
The procedures to determine the number of common factors described above are based on the eigenvalues of the sample covariance matrix,Σ Y . One of the main contributions of Bai and Ng (2002) is to show that the convergence of the eigenvalues of 1 T N Y Y depends on m. Later, Kapetanios (2010) reviews the available literature about the topic pointing out that the distribution of the largest eigenvalue depends in complicated ways on the parameters of the model. It seems that serial correlation affects both the parameters of the asymptotic limits and their functional form. Furthermore, he shows that the first r eigenvalues of Σ Y increase at rate N which follows from the fact that the r largest eigenvalues of F F will grow at rate N as long as the loading matrix P is not sparse and suggests that it is reasonable to expect a similar behavior from the eigenvalues of the sample covariance matrix.
More recently, Onatski (2012Onatski ( , 2015 develops new asymptotics for the eigenvalues of the sample covariance matrix by considering that both the weights and the factors are fixed parameters.

Determining the number of factors after differencing
As mentioned in the Introduction, macroeconomic systems are often non-stationary.
In this section, we analyze the effects on the performance of the number of factors determination procedures described above of transforming the data in a univariate fashion in order to achieve stationarity. Note that differencing affects the ratio between the variances of the factors and idiosyncratic components, the temporal dependence structure and the cross-correlations among the idiosyncratic noises.
Consider the DFM given in Eqs.
(1) to (3) in which Φ and Γ are diagonal matrices which may have 1's in the main diagonal. Consequently, both the factors and the idiosyncratic noises can be either stationary or non-stationary random walks. Under this specification, the system of first-differenced data satisfies all conditions of Bai and Ng (2002); Onatski (2010) and Ahn and Horenstein (2013). After differencing the data in a univariate fashion, the DFM takes the following form Denote by φ i the i-th element in the main diagonal of Φ. If |φ i | < 1, then the variance of the corresponding differenced factor is given by σ 2 η i is the variance of η i . When φ i = 0.5, the difference between the variances of F t and ΔF t is zero. Therefore, in this case, the variance of the factor is not changed after differencing the data. However, if φ i < 0.5, the variance of ΔF t is larger than that of F t while if φ i > 0.5, it is smaller. The same relation can be established for the variances of the elements in ε t and Δε t with respect to γ i , the i-th element in the main diagonal of Γ . Note that if ε t is stationary, with autoregressive parameters smaller than 0.5 while F t is non-stationary, then overdifferencing the idiosyncratic components may introduce distortions on the determination of the number of factors given that the relation between the variances of the common and idiosyncratic components is modified with the variances of ΔF t being smaller and the variances of Δε t being larger. The dynamic dependence of the idiosyncratic noises of the differenced model are given by Finally, note that differencing also affects the cross-correlations of the idiosyncratic noises. Consider, for example, that the correlation between ε it and ε jt is given by ρ.
If the idiosyncratic noises are stationary, then In order to simplify the analysis of the effects of univariate differentiation on the determination of r , we consider Γ = γ I and Σ a = σ 2 a I , so that the idiosyncratic noises are homoscedastic and mutually uncorrelated and all of them are governed by the same autoregressive parameter. Given that there is no correlation between the factors and the idiosyncratic components, the covariance matrix of the firstdifferenced data is given by Σ ΔY = PΣ f P + σ 2 e I , where Σ f is the covariance matrix of ΔF t and σ 2 e = 2σ 2 a /(1 + γ ) is the variance of each element in Δε t . The ordered eigenvalues of Σ ΔY are equal to σ 2 e + μ i for i = 1, . . . , N , where μ i is the i-th largest eigenvalue of PΣ f P . Furthermore, tr PΣ f P = tr P PΣ f = r j=1 σ 2 f j N i=1 p 2 i j = r j=1 μ j . Therefore, the sum of the r largest eigenvalues of Σ ΔY is given by r i=1 λ i = r σ 2 e + r j=1 σ 2 f j N i=1 p 2 i j , while the rest N − r eigenvalues are given by λ i = σ 2 e . Consider the particular case of a unique random walk factor, i.e., r = 1 and φ 1 = 1. In this case, λ 1 = σ 2 η N i=1 p 2 i1 + σ 2 e and λ i = σ 2 e , for i = 2, . . . , N . Consequently, the function to be minimized according to the Bai and Ng (2002) information criteria, is given by The procedure proposed by Onatski (2010) is based on the differences between adjacent eigenvalues. Note that for j = 2, . . . , N , λ j − λ j+1 = 0. Therefore, the procedure should work as far as the difference between λ 1 and λ 2 is large. This difference is given by and does not depend on the value of σ 2 e . Therefore, for given weights and cross-sectional dimension, the procedure should work better when σ 2 η is large. Also, for a given value of σ 2 η , the procedure should work better as N increases. Note that in the first step of the algorithm proposed by Onatski (2010),δ = 0 because for j = r max + 1 eigenvalues λ j are always σ 2 e . Consider the E R(k) criterion of Ahn and Horenstein (2013) given in (9) which looks for a large difference between the ratio of λ 1 and λ 2 with respect to the ratios between other adjacent eigenvalues. Note that, in the particular case we are considering, if N < T , the mock eigenvalue is given by λ , and, consequently, Note that if N is large enough, E R(0) should be close to 0.
Therefore, for given weights, the criteria should work better when q is larger. Finally, consider the G R(k) criterion of Ahn and Horenstein (2013). In this case, note that Therefore,

Finite sample performance
The results in the previous section are based on population covariance matrices and their corresponding eigenvalues. However, in practice, when determining the number of common factors in empirical applications, one should estimate the covariance matrix by its sample version and obtain the corresponding estimated eigenvalues. As mentioned above, the asymptotic distribution of estimated eigenvalues is complicated and not always known. The finite sample properties of the estimated eigenvalues depend on the temporal sample size used for their estimation, T , the cross-sectional dimension, N , the ratio between the variances of the common and idiosyncratic components and the structure of the temporal and cross-sectional dependencies of the idiosyncratic noises. In this section, we carry out Monte Carlo experiments in order to analyze how the determination of the number of factors is affected by univariate differentiation of non-stationary data when implemented in finite samples. We should note that the procedures considered have been developed for N and T going to infinity. However, when the procedures are implemented in practice, both N and T are finite. Our interest in this paper is to study the performance of the criteria under different combinations of N and T similar to those often encountered when dealing with systems of macroeconomic and financial variables. Furthermore, we want to investigate how small N and T can be for the procedures to be reliable under different structures of the factors and idiosyncratic noises. In this way, our results can be of interest for practitioners in empirical applications. The experiments are based on R = 500 replications generated by the DFM in Eqs.
(1) to (3) with N = (12, 50, 100, 200) and T = (100, 500) 5 . Our simulations are categorized into two parts. The first part is designed to investigate how the alternative estimators considered behave when detecting a unique random walk factor under different temporal and cross-sectional structures of the idiosyncratic noises. The second part is designed to analyze models with more than one factor.
Consider first a DFM defined as in Eqs.
(1) to (3) with r = 1, Φ = 1 and σ 2 η = 1. The factor loadings are generated by p i1 ∼ U [0, 1] with N i=1 p 2 i1 = 5. 59, 18.70, 34.63 and 65.56 for N = 12, 50, 100 and 200, respectively;Bai and Ng (2006) and Poncela and Ruiz (2016) also generate the factor loadings by the same distribution. We consider several structures for the idiosyncratic noises. First, the idiosyncratic noises are mutually uncorrelated and homoscedastic. In particular, the autoregressive coefficient matrix of the idiosyncratic components is diagonal, Γ = γ I, with γ = (−0.8, 1) and Σ a = σ 2 a I with σ 2 a = 1 so that σ 2 e = 10 and 1 for the values of γ considered. Note that, differently from simulations carried out in related works, we consider both positive and negative values for the autoregressive parameter of the idiosyncratic noises; see, Pinheiro et al (2013) who estimate correlations for Δε t between -0.6 and 0.9 when dealing with the U.S. monthly macroeconomic data set of Stock and Watson (2005). In order to separate the effects of the temporal dependence and the variance of the differenced idiosyncratic noises on the results, we also consider the combina-tions γ = −0.8 and σ 2 a = 0.1 (σ 2 e = 1) and γ = 1 and σ 2 a = 10 (σ 2 e = 10). We introduce contemporaneous correlations among the idiosyncratic noises. Σ a is generated with σ 2 a = 0.1, 1 and 10 in the main diagonal and, following Onatski (2012), a Toeplitz structure with parameter b = 0.5. Finally, we consider models with heteroscedastic idiosyncratic noises. The variances are generated by σ 2 a i ∼ U [0.5, 1.5] , σ 2 a i ∼ U [0.05, 0.15] and σ 2 a i ∼ U [5,15]; see Bai and Ng (2006) and Breitung and Eickmeier (2011) for the same design to simulate heteroscedastic idiosyncratic noises. In these two latter cases, we consider γ = −0.8 and 1.
For each replica, we generate observations Y t and differentiate the data in a univariate fashion. Then, the eigenvalues of the sample covariance matrix of 1 T −1 (ΔY )(ΔY ) are computed and r is determined using each of the procedures described above with r max = 4, 7 and 13 when N = 12, 50 and 200, respectively 6 . The number of factors determined using the three criteria proposed by Bai and Ng (2002) are denoted byr IC1 , r IC2 ,r IC3 , while the number of factors determined implementing the procedure due to Onatski (2010) is denoted byr ED . Finally, the number of factors estimated using the two ratios proposed by Ahn and Horenstein (2013) are denoted byr ER andr G R . Figure 1 plots, for N = 12 and T = 100, the Monte Carlo averages and 95 % confidence intervals, for homoscedastic and contemporaneously uncorrelated idiosyncratic noises 7 , of i) the sample ordered eigenvalues; ii) their differences; and iii) their ratios, together with the corresponding population quantities, when γ = −0.8 and σ 2 a = 0.1, γ = 1 and σ 2 a = 1, γ = −0.8 and σ 2 a = 1 and γ = 1 and σ 2 a = 10. When the idiosyncratic noises are homoscedastic and white noise, according to the results in previous section, the largest eigenvalue of the population covariance matrix of ΔY is given by λ 1 = σ 2 e + N i=1 p 2 i1 while all other eigenvalues are given by σ 2 e . Note that in the first two cases, σ 2 e = 1 and the population eigenvalues are equal. In the two latter cases, σ 2 e = 10. Figure 1 shows that, regardless of the value of σ 2 e , the eigenvalues are better estimated when γ = 1 than when γ = −0.8, with smaller biases and standard deviations. Obviously, given γ, the eigenvalues are better estimated when σ 2 a is smaller. Therefore, in order to estimate the eigenvalues of the covariance matrix of ΔY,,important not only the relative variance of the differenced idiosyncratic noises but also their temporal dependence is important.
In order to analyze the separate effect of the cross-sectional and temporal dimensions of the system on the estimation of the eigenvalues, Fig. 2 plots the same quantities as in Fig. 1 for γ = −0.8 and σ 2 a = 1, when N = 12, 50 and 200, and T = 100 and 500. Note that when N increases, the first eigenvalue of the population covariance matrix is different and is estimated with larger biases and standard deviations. All other eigenvalues are also estimated with larger biases and standard deviations. Therefore, given T , increasing N could lead to an even worse estimation of the sample of common factors is: (i)r = 0; (ii)r = r ; (iii)r = r max ; and (iv)r > r , when γ = −0.8 and σ 2 a = 0.1 (σ 2 e = 1), when N = 12, 50 and 200 and T = 100 and 500. We consider idiosyncratic noises being homoscedastic and uncorrelated; heteroscedastic and uncorrelated; and homoscedastic and cross-sectionally correlated. We can observe that, regardless of the structure of the idiosyncratic noises and the cross-sectional dimension, when T = 100, the three information estimators tend to overestimate r and in most of the replicatesr IC = r max . However, when T = 500, the percentage ofr IC = r is close to 100 % if the idiosyncratic errors are homoscedastic and cross-sectionally uncorrelated even if N = 12. However, if there is cross-sectional r IC1 r IC2 r IC3 r ED r ER r GR correlationr IC = r max . On the other hand, increasing N leads to a larger percentage ofr IC > r. The performance of the two estimators based on ratios of eigenvalues, r ER andr G R , is very similar and always better than that of the estimator based on differenced eigenvalues,r ED . The percentages of correct estimation of r when implementing ther ER andr G R estimators are close to 90 % when N = 12 and T = 100 and increase to 100 % when increasing either N or T . The results for heteroscedastic and cross-correlated idiosyncratic noises are very similar. Figure 4 plots the same quantities as in Fig. 3 when γ = 1 and σ 2 a = 1. Note that this case is comparable to that in Fig. 3 in the sense that the variance of the differenced idiosyncratic noises is the same, σ 2 e = 1, but the differentiated idiosyncratic noises are cross-sectionally uncorrelated white noises. We can observe that the performance of the alternative procedures to estimate r is rather different to that in Fig. 3. All procedures have correct estimations close to 100 % except the information criteria when N = 12 and the idiosyncratic errors are cross-correlated. In this latter case, r IC = r max . Consequently, not only the variance of the differenced idiosyncratic noises but also its dependence structure have effects on the procedures to detect the number of factors. Only ther ER andr G R estimators seem to be robust to them.
Finally, Fig. 5 considers the case when γ = −0.8 and σ 2 a = 1 with σ 2 e = 10. In this case, the information criteria behave very similarly than when σ 2 a = 0.1 and T = 100 withr IC = r max . However, when N = (12, 50) and T = 500, the information criteria procedures estimater IC = 0. Therefore, it seems that they are more affected by the temporal dependence of the differenced idiosyncratic noises than by their variance. On the other hand, when looking at the performance ofr ER andr G R , we can observe that it clearly deteriorates when σ 2 e = 10. Therefore, their performance clearly depends on σ 2 e . The behavior ofr ED depends both on γ and σ 2 e with a rather large percentage of cases in whichr IC = 0. In the second part of the Monte Carlo experiments, we consider models in which r = 2. First, we consider a second non-stationary common factor, i.e., Φ = I and Σ η = I . Second, the covariance matrix of the factor disturbances is given by Σ η = diag(1, 5). Finally, the last model considered has a second stationary factor with Σ η = I and Φ = diag(1, 0.5).
For each of the three Data Generating Process (DGP) above, Fig. 6 plots the percentages of (i)r = 0; (ii)r = 1; (iii)r = r ; (iv)r = r max ; and (v)r > r , when γ = −0.8 and σ 2 a = 0.1 (σ 2 e = 1) and for N = 12 with T = 100 and N = 200 with T = 500 8 . First of all, observe that when N = 12 and T = 100, the information criteria chosê r = r max in all cases. Increasing the dimensions of the system helps forr I C1 andr I C2 r ED r ER r GR Percentage ofr = r max (blue), r max >r > r (green),r = 2 (red),r = 1 (gold) andr = 0 (black) in a DFM with r = 2, γ = −0.8 and σ 2 a = 0.1. System dimensions N = 12, T = 100 (first column); N = 200, T = 500 (second column). The factors are two random walks with variance σ 2 η = 1 (first row); two random walks with variances σ 2 η 1 = 1 and σ 2 η 2 = 5 (second row) and a random walk with variance σ 2 η 1 = 1 and a stationary factor with σ 2 η 2 = 1. (Color figure online) but not forr I C3 . When looking at the ED, ER and GR criteria, we can observe that, regardless of the structure of the two factors, when N = 200 and T = 500, all of them have percentages of determination of the true number of factors close to 100 %. However, when N = 12 and T = 100, there is a large percentage of replicates in whichr = 1. In this case, the ED procedure is better than the two procedures based on ratios. When the two common random walks in the original data have different variances, the ED procedure has an acceptable proportion of cases in whichr = r.

Empirical analysis
In this section, we implement the procedures considered in this paper to determine the number of common factors in a system of inflation rates in 15 euro area countries, namely, Austria ( PC estimated factors (first row) and corresponding factor weights (second row) obtained assuming r = 3 and using original inflation rates (first column) and differenced rates (second column) 2015, P it , have been obtained from the OCDE data base 9 and transformed into annual inflation as y it = 100 × Δ 12 log(P it ). When needed, the inflation rates have been corrected by outliers using the software developed by the United States Census Bureau 10 . Following Stock and Watson (2005), outliers are substituted by the median of the 5 previous observations. Furthermore, the inflation series have been deseasonalized when appropriate. 11 Then, as in Reis and Watson (2010) and Altissimo et al (2009), we carry out the determination of the number of factors using both the inflation data in levels and after differencing. All procedures are implemented with r max = 5. Regardless of whether the procedures are implemented using the original or differenced inflation rates, the information criteria estimater = 5 andr ER =r G R = 1. However, after differencing, the ED procedure detects just one factor whiler ED = 3 in the original inflation series. According to our Monte Carlo experiments, if the number of true factors is r ≥ 2, then the ED, ER and GR procedures tend to detectr < r when implemented to differentiated data. Therefore, we could expect the true number of factors to be larger than one. Consequently, we extract the factors assuming that r = 3 both from the original and differenced inflation series. In the latter case, the extracted factors are reaccumulated as proposed by Bai and Ng (2004). The extracted factors and their corresponding weights are plotted in Fig. 7; compare with the factor extracted by Delle Monache et al (2016) using quarterly inflation for a panel of 12 inflation rates from a sample of EMU countries. In Fig. 7, there are not significant differences between the factors estimated using the original and differenced inflation rates but for the centering of the latter. This result could be expected since the variances of all the idiosyncratic noises are rather small with values between 0.03 and 0.1. Consequently, the differenced idiosyncratic noises are white noises with small variances.
Finally, we should point out that the main difference between extracting factors assuming that r = 1 or r = 3 is the interpretability. Recall that PC consistently estimates the space spanned by the factors. Therefore, assuming that r = 3 we can obtain rotations that are not allowed when assuming that r = 1.

Conclusions
Differencing non-stationary cointegrated systems have effects on the properties of factor determination procedures. We show that both the variance and the dependence structure of the differenced idiosyncratic noises are important when measuring these effects. If r = 1, the ER and GR procedures work well even in relatively small sizes under all the structures of the idiosyncratic noises considered in this paper. Only when the variance of the differenced idiosyncratic noises is very large with respect to the variance of the differenced factor, the performance is worse although better than the alternatives. However, the performance of all procedures deteriorates when r = 2. In this case, the ED procedure seems to work better.