The purpose of this site is to give current information on Steve Bronder's (me) research and personal life
Panel Analysis of Nonstationarity in Idiosyncratic and Common Components
Panel Analysis of Nonstationarity in Idiosyncratic and Common Components
Steve Bronder
2014-10-14
The purpose of this package is to perform the Panel Analysis of Nonstationarity in Idiosyncratic and Common Components from Bai and Ng (2004,2010). When working with large dimensional panels, standard pooled and aggregated nonstationarity tests tend to over-reject null hypothesis due to:
Curse of dimensionality
Cross-Correlation in panel structure
Weak strength to Large N or large T
Instead of testing the data directly, PANIC performs a factor model to derive the common and idiosyncratic components of the panel. By using the BIC3 from Bai and Ng (2004) it is possible to determine the number of common components in panels that reduce cross correlation in the error term. In this vignette we will perform PANIC on three aggregate levels of National Income and Product Accounts in order to test these aggregates for aggregation bias
Vignette Info
This vignette will use the functions panic10() and panic04() availabe through library(PANICr). These functions perform a factor model on each level of aggregation, derive the common and idiosyncratic components, and then perform several pooled test statistics. One of several benefits of PANIC is that by reducing cross-correlation we allow valid pooling of individual statistics and so panel tests can be run that have reasonable strength. Performing the factor analysis using BIC3, the criteria for determining the number of factors in our approximate factor model, allows us to determine whether the nonstationarity is pervasive, variable specific, or both.
Data
The data we use is gathered from the Price Indexes for Personal Consumption Expenditures by Type of Product available from the BEA. The data is monthly from 1959 to 20131. At this point we run the data through X-132. After extracting each sector we divide them up into three seperate levels of aggregation from highest level of aggregation to lowest. To turn this dataset into year on year inflation we perform \(log(p_{t}/p_{t-12})\). The data is available already cleaned and manipulated as NIPAagg1, NIPAagg2, and NIPAagg3, respectivly.
Model
Consider a factor analytic model:
\(X_{it} = D_{it} + \lambda_{i}' F_{t} + e_{it}\)
Where \(D_{it}\) is a polynomial trend function, \(F_{t}\) is an \(r\times{1}\) vector of common factors, and \(\lambda_{i}\) is a vector of factor loadings. The panel \(X_{it}\) is the sum of a deterministic component \(D_{it}\) , a common component \(\lambda_{i}' F_{t}\), and an error \(e_{it}\) that is largely idiosyncratic. A factor model with \(N\) variables has \(N\) idiosyncratic components, but a smaller number of common factors. \(D_{it}\) can be modeled by \(P\). In PANIC 2004, When the number of common factors is greater than one, \(P=1\) and the deterministic trend has an individual specific fixed effect and time trend. When the number of common factors is equal to one, \(P=0\) is an individual specific fixed effect. When the number of common factors is zero, \(P=0\) is neither.
PANIC 2010 examines the data with ADF models A, B, and C. A assumes no deterministic componet, B assumes a constant to allow for a fixed effect, and C allows a constant and a trend. Note that this is different than P as P is a data generating process while Models A, B, and C impose these constraints inside of the ADF test.
The benefit of this factor model is that, if the number of factors has been correctly determined, the error term will be largely idosyncratic and the common components will explain the largest variance of the data. To determine the approximate number of factors we use the BIC3 from Bai and Ng (2002) such that:
\((k,\hat{F}^k)\) is the average residual variance when k factors are assumed for each cross-section unit. \(\hat{\sigma}^2\) is the mean of the error term squared over N and T.
Once we have this model we perform ADF style pooled tests on the idiosyncratic and common components. panic04 and panic10 ask for nfac, the number of estimated factors, k1, the maximum lag allowed in the ADF test, and jj, the criteria to determine the number of factors in our approximate factor model. nfac is weak to underestimation so it is suggested to overestimate the number of factors. To determine the lag of the ADF test Bai and Ng (2002) suggest \(4(\sqrt{\frac{T}{100}})\). jj is an Integer 1 through 8. Choices 1 through 7 are respectively, IC(1), IC(2), IC(3), AIC(1), BIC(1), AIC(3), and BIC(3), respectively. Choosing 8 makes the number of factors equal to the number of columns whose sum of eigenvalues is less than or equal to .5. panic10() also has the option to run models on demeaned or non-demeaned data (TRUE or FALSE) which will return models A and B in the first case and C in the second.
With this information it is now appropriate to start running our tests.
library(PANICr)
library(MCMCpack)
## Loading required package: coda
## Loading required package: lattice
## Loading required package: MASS
## ##
## ## Markov Chain Monte Carlo Package (MCMCpack)
## ## Copyright (C) 2003-2014 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
## ##
## ## Support provided by the U.S. National Science Foundation
## ## (Grants SES-0350646 and SES-0350613)
## ##
For these tests a 5% critical value of -2.86 for the Common unit root test \(ADF_{\hat{F}}^{c}\) implies rejection. The idiosyncratic unit root test, $P_{}^{c} $ has a 5% critical value of 1.64. I utilize Bai and Ng’s (2002) third information criterion to determine the number of common factors. For rejection rates of the cointergration test see Bai and Ng (2004) as they vary per number of common factors. Lag lengths are determined by the formula \(4(T/100)^{\frac{1}{4}}\) as done in Bai and Ng (2004).The dimensions of the aggregates are (N=12,T=639), (N=46,T=639), (N=160,T=639), respectively.
For PANIC (2010) use table’s one and two found in Bai and Ng (2010) to find the critical values. These tests are only imposed on the idiosyncratic component. Our PMSB test rejects for every level of aggregation (CV = 1.00) and so we conclude, accounting for a structural shift, there is no unit root in the idiosyncratic component. \(P_a\) and \(P_b\) are asymptotically standard normal and so we reject our null hypothesis for these tests as well. For tests of models A, B, and C we must reject both test statistics or conlclude nonstatinarity. For model C we reject our null hypothesis at aggregates 2 and 3, but conclude nonstatinarity in aggregate 1. For model B, we do not reject the null hypothesis for any level of aggregation. For model A, we reject all null hypothesis of every level of aggregation.