*! version 1.0.1 02jul2026

Title

wavenardl -- Wavelet-based Nonlinear ARDL (W-NARDL) model
(Jammazi, Lahiani & Nguyen 2015)

Syntax

wavenardl
depvar [controls]
[if] [in],
decompose(varlist)
[options]

Model
decompose(varlist) variable(s) split into positive/negative
partial sums (required)

maxlag(#) maximum lag order in the grid search; default is
maxlag(4)

ic(string) information criterion, aic or bic;
default is ic(bic)

trend include a linear trend (PSS case V); default is case III

Wavelet denoising
levels(#) number of wavelet decomposition levels J; default is
floor(log2(N))

threshold(string) thresholding rule, soft or hard;
default is threshold(soft)

denoise(string) which series to denoise: all, dep,
indep or none; default is denoise(all)

generate(stub) save the denoised series as stub_varname

Reporting
nocompare skip the benchmark NARDL on the raw series

horizon(#) dynamic multiplier horizon; default is horizon(20)

level(#) confidence level; default is level(95)

nodiag suppress the diagnostic tests

nodynmult suppress the dynamic multipliers

notable suppress the coefficient table

nograph suppress all graphs

The data must be tsset time series (not panel data).
The first variable of the main varlist is the dependent variable;
any remaining variables are non-decomposed (symmetric) controls.

Description

wavenardl estimates the wavelet-based nonlinear autoregressive
distributed lag (W-NARDL) model of Jammazi, Lahiani & Nguyen (2015).
The procedure has three steps:

1. Each selected series is denoised with the non-decimated Haar
"a trous" wavelet transform (HTW) of Murtagh, Starck & Renaud (2004),
thresholding the detail coefficients with the Donoho (1995) universal
threshold lambda = sigma*sqrt(2*ln(N)), where sigma is estimated by the
median absolute deviation (MAD) of the level-1 details.

2. A nonlinear ARDL model (Shin, Yu & Greenwood-Nimmo 2014) is
estimated on the denoised series. Each variable in decompose() is
split into positive and negative partial sums, and the lag orders are
selected by an exhaustive grid search minimizing the chosen information
criterion.

3. Unless nocompare is specified, a standard NARDL is
estimated on the raw series and the two models are compared (R-squared,
information criteria, log-likelihood, Durbin-Watson, bounds F-statistic),
replicating the comparison in Jammazi et al. (2015).

The output includes the Pesaran, Shin & Smith (2001) bounds cointegration
test with asymptotic critical value bounds (cases III and V), Wald tests
for short-run and long-run asymmetry, long-run multipliers computed by the
delta method, dynamic (and cumulative) multipliers, and a full battery of
residual diagnostics with CUSUM and CUSUM-of-squares stability tests.

To denoise series without estimating the model, use the companion command
wdenoise.

Options

Model

decompose(varlist) specifies the variable(s) decomposed into
positive and negative partial sums,
x+(t) = sum of max(dx,0) and x-(t) = sum of min(dx,0).
Required. The dependent variable may not appear here.

maxlag(#) sets the maximum lag order for the dependent variable and
each regressor in the grid search. The search estimates every lag
combination, so the number of models grows quickly with the number of
regressors. Default is 4.

ic(string) chooses the information criterion used to select the lag
orders: aic or bic. Default is bic, as in Jammazi et
al. (2015).

trend adds a linear time trend to the model and uses the PSS case V
(unrestricted intercept, unrestricted trend) critical values for the
bounds test. Without it, case III (unrestricted intercept, no trend) is
used.

Wavelet denoising

levels(#) sets the number of decomposition levels J of the Haar
"a trous" transform. The default (0) uses floor(log2(N)), as in the
original paper; values larger than floor(log2(N)) are capped.

threshold(string) chooses soft thresholding
(sign(d)*max(|d|-lambda,0), the default) or hard thresholding
(d*1{|d|>=lambda}) of the wavelet detail coefficients.

denoise(string) selects which series are denoised before
estimation: all (default) denoises the dependent variable, the
decomposed variables and the controls; dep only the dependent
variable; indep only the regressors; none estimates a plain
NARDL without any denoising (the comparison step is then skipped).

generate(stub) saves each denoised series back into the dataset as
stub_varname.

Reporting

nocompare suppresses the benchmark NARDL estimated on the raw
series and the comparison table.

horizon(#) sets the horizon of the dynamic multiplier paths.
Default is 20.

level(#) sets the confidence level for the long-run multiplier
confidence intervals. Default is level(95).

nodiag, nodynmult, notable and nograph suppress,
respectively, the diagnostic tests, the dynamic multipliers, the
coefficient table and all graph output.

Methodology

The estimated unrestricted error-correction form is

D.y(t) = c + rho*y(t-1) + theta+*x+(t-1) + theta-*x-(t-1)
+ sum gamma_j*D.y(t-j) + sum [beta+_j*D.x+(t-j) + beta-_j*D.x-(t-j)]
+ delta*z terms + e(t)

estimated by OLS on the wavelet-denoised series. The long-run
multipliers are LR+ = -theta+/rho and LR- = -theta-/rho, with standard
errors by the delta method (nlcom). Long-run symmetry is tested
with a Wald test of -theta+/rho = -theta-/rho (testnl); short-run
additive symmetry tests the equality of the summed D.x+ and D.x-
coefficients. Cointegration is assessed with the F-test on the joint
significance of the lagged levels (F_PSS), the t-statistic on y(t-1)
(t_BDM), and the F-test on the lagged levels of the regressors, against
the asymptotic bounds of Pesaran, Shin & Smith (2001).

Examples

Setup

. webuse lutkepohl2, clear

. tsset qtr

W-NARDL of investment on income, income decomposed

. wavenardl ln_inv, decompose(ln_inc) maxlag(2)

With a control, hard thresholding and a trend

. wavenardl ln_inv ln_consump, decompose(ln_inc) maxlag(2) threshold(hard) trend

Denoise only the regressors, save the denoised series, no graphs

. wavenardl ln_inv, decompose(ln_inc) denoise(indep) generate(s) nograph

Plain NARDL (no denoising)

. wavenardl ln_inv, decompose(ln_inc) denoise(none)

Stored results

wavenardl stores the following in e():

Scalars

e(N) number of observations used

e(df_r) residual degrees of freedom

e(best_p) selected lag of the dependent variable

e(best_q_var) selected lag of each decomposed variable

e(aic), e(bic), e(ll) information criteria and log-likelihood (W-NARDL)

e(r2), e(r2_a) R-squared and adjusted R-squared (W-NARDL)

e(dw) Durbin-Watson statistic (W-NARDL)

e(F_pss) PSS bounds F-statistic

e(t_bdm) t-statistic on the lagged dependent variable

e(F_indep) F-statistic on the lagged independent levels

e(k_lr) number of long-run forcing variables (k)

e(lr_pos_var), e(lr_neg_var) long-run multipliers

e(wald_sr_var), e(wald_sr_p_var) short-run asymmetry Wald F and p-value

e(wald_lr_var), e(wald_lr_p_var) long-run asymmetry Wald chi2 and p-value

e(J_var), e(sigma_var), e(lambda_var) wavelet levels, noise scale and threshold per denoised variable

e(aic_raw), e(bic_raw), e(ll_raw), e(r2_raw), e(r2_a_raw), e(dw_raw), e(F_pss_raw) benchmark NARDL statistics (unless nocompare)

Macros

e(cmd) wavenardl

e(cmdline) command as typed

e(depvar) dependent variable

e(decompose) decomposed variable(s)

e(controls) control variable(s)

e(ic) information criterion

e(threshold) thresholding rule

e(denoise) denoising choice

e(case) PSS case (3 or 5)

e(wavelet) haar-a-trous

Matrices

e(b), e(V) coefficients and variance matrix of the
W-NARDL regression

References

Donoho, D. L. (1995). De-noising by soft-thresholding.
IEEE Transactions on Information Theory, 41, 613-627.

Jammazi, R., Lahiani, A., & Nguyen, D. K. (2015). A wavelet-based
nonlinear ARDL model for assessing the exchange rate pass-through to
crude oil prices. Journal of International Financial Markets,
Institutions and Money, 34, 173-187.

Murtagh, F., Starck, J. L., & Renaud, O. (2004). On neuro-wavelet
modeling. Decision Support Systems, 37, 475-484.

Narayan, P. K. (2005). The saving and investment nexus for China:
evidence from cointegration tests. Applied Economics, 37, 1979-1990.

Pesaran, M. H., Shin, Y., & Smith, R. J. (2001). Bounds testing
approaches to the analysis of level relationships.
Journal of Applied Econometrics, 16, 289-326.

Shin, Y., Yu, B., & Greenwood-Nimmo, M. (2014). Modelling asymmetric
cointegration and dynamic multipliers in a nonlinear ARDL framework. In
Festschrift in Honor of Peter Schmidt, 281-314. Springer.

Author

Dr Merwan Roudane

Independent Researcher

Email: merwanroudane920@gmail.com

GitHub: github.com/merwanroudane

Please cite the package as:

Roudane, M. (2026). wavenardl: Stata module for the wavelet-based
nonlinear ARDL model.