*! version 1.0.0 28may2026
help xtcsnardl_examplesalso see: xtcsnardl xtcsnardl_methodology xtcsnardl_postestimation xtcsnardl_graph

Worked examples -- CS-NARDL

Contents

Example 1. Quick start - the minimum syntax

Example 2. EURO-4 carbon emissions (Mehta & Derbeneva 2024)

Example 3. BRICS renewable energy (Wang et al. 2022)

Example 4. Mean Group with Hausman, panel-specific phi

Example 5. Custom CSA list & turning off augmentation

Example 6. Synthetic DGP for replication

Interpretation cheat sheet

Example 1. Quick start

With a panel already xtset:

. xtset country year

. xtcsnardl D.y L.y D.x1 D.x2, lr(L.y x1 x2) asymmetric(x1)

This estimates a PMG model in which x1 is decomposed asymmetrically and x2 is
treated symmetrically. Both enter the long-run cointegrating vector; cross-sectional
averages of y, x1+, x1-, and x2 are added to the LR equation with
floor(T1/3) lags. Tables 1-3 and 5, plus the Pesaran CD test, are printed by default.

Example 2. EURO-4 carbon emissions (Mehta & Derbeneva 2024)

The reference paper studies four European economies (Germany, UK, France, Italy) over 1995-2022.
Variables:

omega per-capita CO2 emissions (dependent)

rho carbon tax / GDP (asymmetric)

gamma environmental spending / GDP (asymmetric)

pi industrial value-added / GDP

psi GDP per capita

theta urbanisation rate

The CS-NARDL specification:

. xtset country year

. xtcsnardl D.omega L.omega D.rho D.gamma D.pi D.psi D.theta, ///

lr(L.omega rho gamma pi psi theta) ///

asymmetric(rho gamma) pmg cr_lags(2) ///

multip(15) irfshock(15) asytable panelcoef hausman ///

showcsa graph

What to expect (qualitatively):

• Table 1 -- {&beta}+rho {&asymp} -0.080 (carbon-tax rise lowers
emissions), {&beta}-rho {&asymp} +0.050 (carbon-tax cut raises them, but less
strongly). Long-run asymmetry CIs do not overlap.

• Table 2 -- {&phi} {&asymp} -0.47, half-life {&asymp} 1.4 years, class
"strong".

• Table 5 -- long-run asymmetry rejected at 1% for both rho and gamma;
short-run asymmetry rejected at 1% for rho only.

• Table 8 / graph csn_multip_1 -- m+(h) and m-(h) flatten by
period 6-7; asymmetry persists in the long run.

• Table 10 -- Pesaran CD p {>} 0.10 (no residual CSD).

Policy reading: a carbon-tax increase is roughly twice as effective at reducing emissions
as a carbon-tax cut is at raising them. Asymmetric instrument design is therefore
welfare-improving.

Example 3. BRICS renewable energy consumption (Wang et al. 2022)

Five emerging economies (Brazil, Russia, India, China, South Africa), 1996-2020. Variables:

REC renewable energy consumption (% of total, log)

FID financial institutions index (asymmetric)

ICTtrade ICT goods trade (% of total, asymmetric)

GDP GDP per capita (log)

RD R&D expenditure (% of GDP)

Inflation CPI inflation

. xtset country year

. xtcsnardl D.REC L.REC D.FID D.ICTtrade D.GDP D.RD D.Inflation, ///

lr(L.REC FID ICTtrade GDP RD Inflation) ///

asymmetric(FID ICTtrade) pmg multip(20) graph

Interpretation pointers:

• A positive shock to FID raises REC by ~3.8% in the long run; a negative
shock raises it by ~2.9% (both significant). The "raises" sign on negative may surprise
readers -- the paper's interpretation is that financial-sector deterioration prompts a
shift toward cheaper renewables.

• ICT-trade asymmetry: positive shock enhances REC, negative shock hurts
REC. Asymmetry sign-symmetric, magnitude asymmetric.

• Use panelcoef to inspect per-country {&phi}i: in Wang et al. (2022) the
half-life is highest for Russia (~3 years) and lowest for South Africa.

Example 4. Mean Group with Hausman test

PMG imposes long-run pooling. When that restriction fails (the Hausman test rejects), switch
to MG:

. xtcsnardl D.y L.y D.x1 D.x2, ///

lr(L.y x1 x2) asymmetric(x1) hausman

The hausman option estimates both MG and PMG, then runs

. hausman MG_xtpmg PMG_xtpmg, sigmamore

under H0: long-run pooling restriction valid. If you reject:

. xtcsnardl D.y L.y D.x1 D.x2, lr(L.y x1 x2) asymmetric(x1) mg multip(15)

Note that in MG mode the long-run asymmetry test (Table 5) is on the mean group averages;
the per-panel coefficients (with panelcoef) will show wider dispersion than PMG.

Example 5. Custom CSA list & turning off augmentation

By default xtcsnardl takes CSA of y and every substantive LR regressor (including
the positive and negative partial sums). Per Hacioglu-Hoke & Kapetanios (2020) this is the
safe choice. If you need to economise on degrees of freedom in a short panel:

. xtcsnardl D.y L.y D.x, lr(L.y x) ///

asymmetric(x) csavars(y x_pos x_neg) cr_lags(1)

This restricts the CSA proxy set to y, x_pos, x_neg (skips any control whose
CSA might be collinear in your data).

For a diagnostic comparison without any cross-section augmentation:

. xtcsnardl D.y L.y D.x, lr(L.y x) asymmetric(x) nocsa

This reduces to the classical Panel NARDL (same as pnardl). Look at the Pesaran CD
table -- if it rejects independence, the nocsa estimates are biased.

Example 6. Synthetic DGP for replication

The following do-file generates a CS-NARDL DGP with one common factor, an asymmetric regressor
and panel-specific speeds of adjustment. Run it to verify that xtcsnardl recovers the
true parameters.

* ----------------------- DGP -----------------------
clear all
set seed 1234
set obs 30
gen country = _n
expand 60
bysort country: gen year = 1960 + _n - 1
xtset country year

* common factor (AR(1))
gen f = .
by country: replace f = rnormal() in 1
by country: replace f = 0.5*f[_n-1] + rnormal()*0.3 in 2/L

* idiosyncratic
gen v = rnormal()
gen eps = rnormal()

* asymmetric regressor x with loading on f
gen lam_x = runiform(0.4, 0.8)
gen x = lam_x*f + v

* asymmetric DGP for y: Dy = phi*(y_{t-1} - b_p*x_pos - b_n*x_neg - lam_y*f_bar) + eps
gen lam_y = runiform(0.3, 0.7)
gen phi = -runiform(0.2, 0.5)
gen y = 0
by country: replace y = phi*(L.y - 0.8*x - (-1.2)*x + lam_y*f) + eps if _n > 1
* (Note: the DGP uses the true x rather than partial sums; this only matters in
* finite samples for the asymmetry test power.)

* ------------------- ESTIMATE ----------------------
xtcsnardl D.y L.y D.x, ///
lr(L.y x) asymmetric(x) ///
pmg cr_lags(3) multip(20) asytable hausman graph

Expected recovery: {&beta}+ {&asymp} 0.8, {&beta}- {&asymp} -1.2 (asymmetry of
~2), {&phi}-mean {&asymp} -0.35.

Interpretation cheat sheet

Q. The long-run beta+ and beta- are both negative. Is the model still "asymmetric"?

Yes, if the magnitudes differ. Same-sign asymmetry is common: xt affects yt
in one direction but the size of the impact depends on whether x is rising or falling. Read
the |beta+| - |beta-| entry in Table 6 and the asymmetry curve in graph
csn_multip_*.

Q. The short-run asymmetry test fails to reject but the long-run does. What does this mean?

The impact effect (within-period response) is symmetric, but the cumulative
adjustment differs. Path-dependence accumulates over the error-correction horizon. This
is the most common empirical pattern.

Q. Pesaran CD test rejects independence even with cr_lags = floor(T^(1/3)). Now what?

Increase cr_lags() step-by-step until the test fails to reject, or add
theoretically motivated extra CSA proxies via csavars(). If after generous augmentation
the test still rejects, you have evidence of a second factor that CSA cannot proxy
(e.g. nonlinear dependence, regime breaks). Consider a panel break test (xtbreak) or
the factor-based estimator of Bai (2009).

Q. The per-panel phi range is very wide. Is PMG still appropriate?

PMG only pools the long-run coefficients, not phi. Wide dispersion of phii is therefore
not an objection to PMG. Run the hausman test on the long-run
coefficients; if it does not reject, keep PMG.

Q. Should I include the control variables in asymmetric()?

Only if theory predicts asymmetric effects. Decomposing every regressor inflates parameter
counts and reduces power. In the EURO-4 paper the carbon tax and environmental spending
are asymmetric; GDP, industrial growth and urbanisation are not.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

xtcsnardl v1.0.0, 28 May 2026

Also see

Online: xtcsnardl, xtcsnardl_methodology, xtcsnardl_postestimation, xtcsnardl_graph

Related: xtpmg, pnardl, xtdcce2, xtcspqardl, xtcd2