- Introduced by
- Jushan Bai & Serena Ng
- Year
- 2004
- Type
- Panel unit root test
- Family
- Panel unit-root tests (2nd gen)
What does it do?
PANIC (Panel Analysis of Non-stationarity in Idiosyncratic and Common Components) is a second-generation panel unit root test introduced by Bai and Ng (2004).
It decomposes each panel series into common factors and idiosyncratic components and tests for a unit root in each part, which allows it to handle cross-sectional dependence that distorts first-generation tests such as IPS or LLC. Its distinguishing feature is that it asks where the non-stationarity lies: in the common part, in the unit-specific part, or in both.
The intuition behind the method
First-generation panel unit root tests can be misled when a shock hits many units at once, because the correlation across units violates their independence assumption. PANIC addresses this by first separating each observed series into a part driven by common factors and a unit-specific remainder, and then testing the two parts separately. The original paper notes that the components are estimated consistently even when regressions on the observed series are individually spurious, and that testing the components rather than the observed series gives more accurate inference when the components have different orders of integration. The result is a diagnosis of whether non-stationarity is pervasive, specific to individual units, or both.
History
Bai and Ng (2004) introduced PANIC in Econometrica. The paper develops a factor-based methodology that makes use of the factor structure of large dimensional panels to determine whether non-stationarity is pervasive, variable-specific, or both. PANIC tests the components of the data rather than the observed series, and it consists of univariate and panel tests. The name is an acronym for Panel Analysis of Non-stationarity in Idiosyncratic and Common components.
When to use it
Choose PANIC when you have a panel with many units observed over a reasonably long period, when the units are plausibly linked by shared unobserved shocks such as a global cycle or common commodity price movements, and when the question is whether non-stationarity is common, idiosyncratic, or both. Do not use it when the panel is small in either dimension, because factor estimation and the asymptotic approximations weaken; when the dependence is unlikely to be low-rank and factor-like, for example neighbourhood or trade-network dependence; or when there is no reasonable basis for a common-factor structure. If only a simpler test is needed, CIPS offers a cross-sectional augmentation approach without explicit factor extraction, and CADF is a single-equation alternative.
Limitations and considerations
- Requires the number of common factors r to be pre-specified or consistently estimated (e.g., via Bai-Ng IC criteria), and results can be sensitive to this choice
- Both N and T must be sufficiently large for the principal-component estimator and the asymptotic theory to be reliable; small-panel performance is not guaranteed
- Assumes an approximate factor model; if cross-sectional dependence has a non-factor structure (e.g., spatial or network dependence), the test may not fully account for it
- Finite-sample size and power should be checked for the sample size at hand; the original paper reports Monte Carlo results, and these should be consulted before relying on the test in small samples
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Models cross-sectional dependence through an approximate factor structure rather than assuming it away, which addresses the size distortions that first-generation tests show under such dependence.
- Tests the common and idiosyncratic components separately, so the output indicates whether non-stationarity is pervasive, unit-specific, or both, something pooled first-generation tests cannot separate.
- Because it tests estimated components rather than the observed series, inference is more accurate when the components have different orders of integration, according to the original paper, which also reports very good size and power in Monte Carlo simulations.
- Allows valid panel tests even when cross-section correlation would invalidate pooling of statistics constructed from the observed data.
Applications
- Testing purchasing power parity (PPP) across a large cross-section of countries where global inflation trends create cross-sectional correlation
- Examining stationarity of real GDP growth panels in international business cycle studies with common global shocks
- Analysing panel energy-consumption or CO2-emission series where world energy price trends act as common factors
- Testing interest rate parity or current account sustainability in multi-country panels subject to global monetary policy spillovers
- Assessing convergence hypotheses in cross-country income panels where technology diffusion generates a common non-stationary trend
How it works
How it works
Each observed series x_it is written as a factor-loading-weighted sum of common factors F_t plus an idiosyncratic term e_it, for N units observed over T periods. The procedure depends on this additive structure: once the common factors are separated out, the idiosyncratic terms are the objects tested for unit roots, so cross-sectional correlation that runs through the factors is not carried directly into the unit-root inference.
Formula
x_{it} = \lambda_i' F_t + e_{it}, \quad i=1,\ldots,N,\; t=1,\ldots,TThe number of common factors r is chosen before this step, for example with the Bai-Ng information criteria. Principal components are then applied to the first differences of the data to estimate the factor increments f_s. Cumulating these estimated increments gives the level common factor, F^c_t = sum of f_s for s from 2 to t, which is then tested for a unit root. Working in differences is what allows the factor to be recovered from data whose levels may be non-stationary.
Formula
\hat{F}_t = \text{PC}(\Delta x_{it}), \quad \hat{F}_t^c = \sum_{s=2}^{t} \hat{f}_sOnce the estimated common component is removed, the idiosyncratic residuals are obtained for each unit. An augmented Dickey-Fuller regression with lagged differences is run on each residual series, producing a unit-specific result that reflects persistence not attributable to the common factors.
Formula
\Delta \hat{e}_{it} = \alpha_i \hat{e}_{i,t-1} + \sum_{j=1}^{p_i} \phi_{ij} \Delta \hat{e}_{i,t-j} + \varepsilon_{it}The unit-specific p-values from the idiosyncratic regressions are combined using Fisher-type rules. P_a combines the logarithms of the p-values. Because each small p-value makes -2 ln p_i large, P_a is sensitive to very small individual p-values, and the null is rejected when P_a exceeds the critical value of its limiting distribution. The null hypothesis is that each idiosyncratic component has a unit root, so rejection indicates that the idiosyncratic components are not all non-stationary. P_b combines the inverse-normal transforms of the same p-values; its exact normalisation and limiting distribution should be taken from the original paper. The asymptotic justification for both statistics requires both N and T to be large, and the exact conditions are stated in the original paper.
Formula
P_a = -2 \sum_{i=1}^{N} \ln p_i, \quad P_b = -2 \sum_{i=1}^{N} \Phi^{-1}(p_i) / \sqrt{N} \xrightarrow{d} N(0,1)Common pitfalls
- Choosing too few or too many common factors distorts both the idiosyncratic residuals and the common-factor tests; determine the number of factors with the Bai-Ng information criteria rather than by inspection.
- Applying PANIC to a panel where T is short relative to N makes principal-component estimation unreliable; verify that T is large enough for the factors to be recovered consistently.
- The basic procedure does not model structural breaks in the common factors, so a unit-root conclusion may be driven by a break; consider break-robust extensions when breaks are suspected.
- Reading a unit root in the idiosyncratic component as a unit root in the common factor, or the reverse, leads to incorrect conclusions about the source of persistence; report both sub-tests, not only the pooled statistic.
Frequently asked questions
How does PANIC differ from the CIPS test of Pesaran (2007)?
Both are second-generation tests designed for cross-sectional dependence, but PANIC explicitly extracts common factors via principal components and then tests the idiosyncratic components separately. CIPS instead augments each unit's ADF regression with cross-sectional averages as a proxy for a single common factor. That is simpler to implement, but less flexible when several common factors are present, which is the setting in which PANIC is usually preferred.
What happens if I use PANIC on a panel with only cross-sectional dependence of the spatial type?
PANIC is designed for dependence driven by a small number of common factors. If dependence follows a spatial or network pattern rather than a low-rank factor structure, principal-component extraction will not remove all cross-sectional correlation, and test size may be affected. In that case, check whether the test's assumptions cover that form of dependence, and consider spatial panel unit-root methods instead.
Should I report P_a, P_b, or both?
Reporting both is good practice because the two statistics combine the unit-specific p-values differently. P_a is sensitive to very small individual p-values, so if the two statistics disagree, this may indicate that a few extreme unit-level results are driving one of them. In that case, inspect the unit-specific results before drawing conclusions from the pooled statistic.
Related methods
Sources
Bai, J., & Ng, S. (2004). A PANIC attack on unit roots and cointegration. Econometrica, 72(4), 1127–1177.
Open DOI reference