*! xtccecoint.sthlp — v1.0.0 — 2026-05-11

Title

xtccecoint -- Panel CCE Cointegration Test
(Banerjee & Carrion-i-Silvestre, 2017)

Syntax

xtccecoint depvar indepvars [if] [in]
[, options]

Model
model(#) deterministic specification: 0, 1, or 2; default is 2

nfactors(#) number of common factors r; default is k+1 (rank equality)

method(#) cross-section dependence approach: 0=OLS, 1=CCE; default is 1

option(#) CCE estimator: 0=individual, 1=MG, 2=PCCE; default is 2

plags(#) AR lag order for CADF regression; default is 1

notruncate disable truncation of individual t-ratios

Output
plot produce diagnostic visualization plots

notable suppress output tables

saving(string) filename stem for saved graphs

noisily display verbose Mata computation output

Description

xtccecoint implements the CADF_P panel cointegration test proposed by
Banerjee and Carrion-i-Silvestre (2017). The test assesses whether a set of
I(1) variables in a panel are cointegrated, while accounting for cross-section
dependence using the Common Correlated Effects (CCE) approach of Pesaran (2006).

Unlike tests that require explicit estimation of common factors (e.g., Bai-Ng
principal components), this command uses cross-section averages as convenient
and robust proxies for the unobserved common factors. No pre-testing for the
number of factors is required.

The key result is the CADF_P panel statistic — the cross-sectional mean of
individual unit-level CADF (Cross-section Augmented Dickey-Fuller) t-ratios
applied to the residuals of the pooled CCE regression:

CADF_P = N^{-1} × Σᵢ t_{α̂_}

Under the null hypothesis of no cointegration, CADF_P is asymptotically normal.
Reject H0 if CADF_P < critical value (left-tail test).

The command faithfully translates the original GAUSS code cadfcoin_multiple.src
by Carrion-i-Silvestre (2021), ensuring numerical parity with the published results.

Background and Motivation

The Problem: Cross-Section Dependence in Panel Cointegration

Early panel cointegration tests (Kao 1999, Pedroni 2000) assumed cross-section
independence — an assumption rarely met in economic panels. Cross-section dependence
arises from:

• Common global shocks (oil prices, financial crises)

• Market integration and globalization

• Spillover effects among regions/countries

Ignoring cross-section dependence leads to severe size distortions in standard
panel cointegration tests.

The CCE Solution

The CCE approach (Pesaran 2006) augments individual cross-section regressions
with cross-sectional averages ȳ_t and x̄_ of the dependent and independent
variables. These averages serve as proxies for the unobserved common factors:

Ŷ_t ≈ F_t (as N → ∞)

This makes CCE-based procedures asymptotically equivalent to factor-based
procedures (Pesaran 2007, Pesaran et al. 2013), without requiring the estimation
or identification of the number of factors.

Link to Pesaran (2007) Panel Unit Root Test

The CADF_P statistic in this command is asymptotically equivalent to the CIPS
panel unit root statistic in Pesaran (2007) and the Pesaran et al. (2013) test
for multiple common factors. The key difference is that here the test is applied
to the residuals of the PCCE regression, not to the raw series.

This means xtccecoint can be seen as a CCE-augmented version of existing
panel unit root and cointegration tests.

Model Specifications

Model 0 — No Deterministics

No intercept, no trend. The DGP is:

y_ = β'x_ + Λ_i F_t + ε_

Model 1 — Constant (default for I(0) processes)

With individual-specific intercepts:

y_ = α_i + β'x_ + Λ_i F_t + ε_

Truncation constants: (d1, d2) = (6.19, 2.61).

Model 2 — Constant + Linear Trend (default for trending series)

With individual-specific intercepts AND linear trends:

y_ = α_i + δ_i t + β'x_ + Λ_i F_t + ε_

Truncation constants: (d1, d2) = (6.42, 1.70).

Recommendation: Use Model 2 for most macroeconomic panels (GDP, prices,
production functions). Use Model 1 for mean-stationary panels (ratios, rates).

Options

model(#) specifies the deterministic component:

0 = no deterministics

1 = constant (intercept only)

2 = constant + linear trend. Default.

nfactors(#) sets the number of common factors r. This controls how many
cross-section averages enter the CADF regression:

r = 1: Only ȳ_t enters (Pesaran 2007 equivalence). Use when one dominant factor.

r = k+1: All k+1 averages enter (rank condition with equality). Conservative and recommended default for unknown structure.

Intermediate values: r CS averages of regressors are included.

method(#) controls how cross-section dependence is handled:

0 = OLS per unit (no CSD adjustment). Use only for independent panels.

1 = CCE augmentation. Default.

option(#) selects the CCE coefficient estimator:

0 = Individual CCE: unit-by-unit OLS with CS augmentation

1 = Mean Group CCE (MGCCE): average of individual CCE estimates

2 = Pooled CCE (PCCE): pooled estimator. Default. Recommended.

plags(#) sets the AR lag order p for the CADF regression. Following Pesaran
(2007), increasing p accounts for higher-order serial correlation in the
idiosyncratic component. Default is 1. Try values 0, 1, 2, 3, 4 to
assess robustness.

notruncate disables truncation of individual t-ratios to the range
[-d1, d2]. Truncation (default ON) ensures the panel mean statistic has
finite moments even in small samples, following Pesaran (2007, p.277).

plot produces 4 publication-quality diagnostic plots:

(1) Individual CADF statistics: sorted dot chart by unit

(2) Cross-section averages (CCE factor proxies) time series

(3) Histogram of individual statistics vs. critical values

(4) Combined 2×2 dashboard

saving(string) saves all plots as PNG files with the given stem prefix.

noisily shows detailed Mata computation output (unit-by-unit statistics).

How to Interpret the Results

Step 1: Check the CADF_P statistic.

If CADF_P < CV (5%), reject H0: strong evidence of panel cointegration.

If CADF_P > CV (10%), do not reject H0: no evidence of panel cointegration.

Step 2: Check robustness across lag specifications.

Re-run with different values of plags(): 0, 1, 2, 3. If the conclusion
is consistent, the result is robust. Divergent results suggest the lag order
matters and longer lags may be needed.

Step 3: Check individual statistics.

matrix list e(cadf_ind) shows unit-specific statistics. Panel rejection
of H0 does not imply all units are cointegrated — some may be spurious
while others are truly cointegrated.

Step 4: Compare r = 1 vs. r = k+1.

Re-run with nfactors(1) (r=1, inequality case) and compare with the
default (r=k+1, equality case). If both agree, the conclusion is robust to
uncertainty about the number of common factors.

Key note on the null hypothesis:

H0 is no cointegration. Failing to reject H0 is NOT evidence of cointegration —
it is simply a lack of evidence against poor integration. Rejection of H0
constitutes statistical evidence for cointegration.

Comparing with xtbreakcoint

xtccecoint and xtbreakcoint test for panel cointegration from
complementary angles:

xtccecoint: Time-series data or panel; accounts for cross-section dependence
via CCE; no structural breaks required.

xtbreakcoint: Purpose-built panel cointegration with structural breaks; requires
large panel (N > 5, T > 50).

Critical Values

Critical values are tabulated from Monte Carlo simulations using 50,000
replications under a DGP with independent I(1) regressors and no cointegration,
following the procedure in Banerjee and Carrion-i-Silvestre (2017).

Tables are indexed by: model, k+1 (observables), r (common factors), p (AR lags),
T ∈ {30, 50, 70, 100, 200}, N ∈ {20, 30, 50, 70, 100, 200}.

For T and N values not in the grid, bilinear interpolation is applied.

Example (Model 2, r=1, k=1 [k+1=2], p=1):

T \ N 20 30 50 70 100 200

30 (5%) -2.96 -2.91 -2.86 -2.84 -2.83 -2.81

50 (5%) -2.85 -2.80 -2.75 -2.72 -2.71 -2.69

100 (5%) -2.78 -2.72 -2.67 -2.65 -2.63 -2.61

200 (5%) -2.75 -2.69 -2.64 -2.62 -2.60 -2.58

Examples

Example 1: US House Prices (replication of Holly et al. 2010 / Section 5.1)

49 US states, annual 1975–2003 (N=49, T=29). Testing cointegration between
log real house prices (lnhp) and log real per-capita disposable income (lninc).

. * Setup: use real data or simulate

. use xtccecoint_example.dta, clear

. xtset state year

. * Run with one common factor (as in Holly et al. 2010)

. xtccecoint lnhp lninc, model(1) nfactors(1) plags(1)

Expected: CADF_P ≈ -2.56 for p=1. Reject H0 at 5% → evidence of cointegration.

. * Robustness across lag orders

. forvalues p = 0/4 {

. xtccecoint lnhp lninc, model(1) nfactors(1) plags(`p') notable

. di "p=`p': CADF_P = " e(cadfp)

. }

Example 2: OECD Production Function (Section 5.2)

19 OECD countries, annual 1951–2007 (N=19, T=57). Production function:
log GDP = α_i + β₁ log(labor) + β₂ log(capital) + u_it.

. xtccecoint lngdp lnlab lncap, model(2) nfactors(3) plags(2)

. * nfactors(3) = k+1 = 3 regressors + 1 (rank condition with equality)

Example 3: With diagnostic plots

. xtccecoint lnhp lninc, model(1) nfactors(1) plags(1) plot saving(hp_test)

Example 4: Compare r=1 (inequality) vs. r=k+1 (equality)

. * Conservative: assume rank condition met with equality (default)

. xtccecoint lnhp lninc, model(1) nfactors(2) plags(1)

. di "Equality case: CADF_P = " e(cadfp)

. * Liberal: assume only one common factor

. xtccecoint lnhp lninc, model(1) nfactors(1) plags(1)

. di "Inequality case: CADF_P = " e(cadfp)

Example 5: Accessing stored results

. xtccecoint lnhp lninc, model(1) nfactors(1) plags(1)

. ereturn list // all stored scalars and matrices

. display e(cadfp) // panel CADF_P statistic

. display e(cv5) // 5% critical value

. matrix list e(cadf_ind) // individual unit statistics

. matrix list e(b) // PCCE slope estimates

Example 6: Using with xtnumfac for automatic factor selection

. xtnumfac lnhp lninc // estimate number of factors

. local rhat = r(factors)

. xtccecoint lnhp lninc, model(1) nfactors(`rhat') plags(1)

Example 7: Comparison with xtbreakcoint (complementary test)

. * CCE-based test (this command)

. xtccecoint lnhp lninc, model(1) nfactors(1) plags(2)

. * Factor-based test with breaks

. xtbreakcoint lnhp lninc, model(2)

Stored results

xtccecoint stores the following in e():

Scalars

e(cadfp) Panel CADF_P statistic (cross-sectional mean of individual t-ratios)

e(cv5) 5% asymptotic critical value

e(cv10) 10% asymptotic critical value

e(N) number of cross-section units

e(T) number of time periods

e(k) number of stochastic regressors

e(nfactors) number of common factors used

e(plags) AR lag order

e(model) model type (0, 1, or 2)

e(method) CSD method (0=OLS, 1=CCE)

e(opttype) estimator type (0=CCEI, 1=MG, 2=PCCE)

e(truncated) 1 if truncation applied, 0 otherwise

Matrices

e(b) 1 × k vector of PCCE/CCE slope estimates

e(V) k × k variance-covariance matrix (placeholder — set to zero; standard
errors for the cointegrating vector are not provided)

e(cadf_ind) 1 × N vector of individual CADF t-ratios

Macros

e(cmd) xtccecoint

e(cmdline) full command as typed

e(depvar) dependent variable name

e(indepvars) independent variable names

e(panelvar) panel ID variable

e(timevar) time variable

e(estimator) estimator description

e(modtype) model specification description

e(papers) citation

e(properties) b V

Author

Dr. Merwan Roudane

Email: merwanroudane920@gmail.com

Acknowledgements

This command is a faithful Stata/Mata translation of the original GAUSS code
cadfcoin_multiple.src by Josep Lluís Carrion-i-Silvestre (University of
Barcelona, August 21st, 2021), provided as supplementary material to:

Banerjee, A. & Carrion-i-Silvestre, J.L. (2017). Testing for Panel Cointegration
Using Common Correlated Effects Estimators. Journal of Time Series Analysis,
DOI: 10.1111/jtsa.12234.

The CCE approach is due to Pesaran (2006). The CIPS/CADF panel unit root test is
from Pesaran (2007). Critical values simulation methodology follows Pesaran et al. (2013).
The truncation thresholds follow Pesaran (2007, p.277).

Related commands by the same author:
xtbreakcoint (Banerjee & CiS 2015), cupfm (Bai, Kao & Ng 2009),
cobreakcoint (Carrion-i-Silvestre & Kim 2019).

References

Banerjee, A. & Carrion-i-Silvestre, J.L. (2017). Testing for Panel Cointegration Using
Common Correlated Effects Estimators. J. Time Series Anal., DOI: 10.1111/jtsa.12234.

Holly, S., Pesaran, M.H. & Yamagata, T. (2010). A spatio-temporal model of house prices
in the USA. J. Econometrics, 158, 160–173.

Pesaran, M.H. (2006). Estimation and inference in large heterogeneous panels with a
multifactor error structure. Econometrica, 74, 967–1012.

Pesaran, M.H. (2007). A simple panel unit root test in the presence of cross-section
dependence. J. Appl. Econometrics, 22, 265–312.

Pesaran, M.H., Ullah, A. & Yamagata, T. (2013). A bias-adjusted LM test of error
cross-section independence. Econometrics J., 11, 105–127.

Also see

Help: xtbreakcoint, cupfm, cobreakcoint,
xtdcce2, xtcce, xtnumfac, xtcd2