| Title: | Fourier Bootstrap ARDL Cointegration Test |
|---|---|
| Description: | Implements the Fourier Bootstrap Autoregressive Distributed Lag (FBARDL) bounds testing approach for cointegration analysis. Combines the Pesaran, Shin and Smith (2001) <doi:10.1002/jae.616> ARDL bounds testing framework with Fourier terms to capture smooth structural breaks, as in Yilanci, Bozoklu and Gorus (2020) <doi:10.1016/j.scs.2020.102035>, and recursive bootstrap critical values following McNown, Sam and Goh (2018) <doi:10.1080/00036846.2017.1366643> and Bertelli, Vacca and Zoia (2022) <doi:10.1016/j.econmod.2022.105987>, with the Fourier frequency and the lags selected again in every bootstrap replication (a package choice); finite-sample bounds test critical values from Kripfganz and Schneider (2020) <doi:10.1111/obes.12377> for models without Fourier terms. Features include lag selection via AIC/BIC, Fourier frequency selection by minimum SSR, long-run and short-run coefficient estimation and diagnostic tests. |
| Authors: | Muhammad Alkhalaf [aut, cre, cph] (ORCID: <https://orcid.org/0009-0002-2677-9246>) |
| Maintainer: | Muhammad Alkhalaf <[email protected]> |
| License: | GPL-3 |
| Version: | 1.2.0 |
| Built: | 2026-11-02 13:21:06 UTC |
| Source: | https://github.com/muhammedalkhalaf/fbardl |
ARDL bounds tests for cointegration (Pesaran, Shin and Smith, 2001) with optional Fourier terms for smooth breaks and bootstrap critical values (McNown, Sam and Goh, 2018; Bertelli, Vacca and Zoia, 2022).
fbardl( formula, data, type = c("fbardl_bvz", "fbardl_mcnown", "fardl"), maxlag = 4, maxk = 5, ic = c("aic", "bic"), case = 3, reps = 999, fourier = TRUE, level = 0.95, horizon = 20, unconditional = FALSE, kgrid = c("integer", "fractional"), kstar = NULL, lags = NULL, seed = NULL )fbardl( formula, data, type = c("fbardl_bvz", "fbardl_mcnown", "fardl"), maxlag = 4, maxk = 5, ic = c("aic", "bic"), case = 3, reps = 999, fourier = TRUE, level = 0.95, horizon = 20, unconditional = FALSE, kgrid = c("integer", "fractional"), kstar = NULL, lags = NULL, seed = NULL )
formula |
A formula of the form |
data |
A data frame containing the time series variables. |
type |
Character string specifying the test type:
|
maxlag |
Integer. Maximum lag order for grid search (default: 4). |
maxk |
Numeric. Maximum Fourier frequency (default: 5). |
ic |
Character string. Information criterion for lag selection:
|
case |
Integer. PSS case specification (2, 3, 4, or 5). Default is 3 (unrestricted intercept, no trend). |
reps |
Integer. Number of bootstrap replications (default: 999). |
fourier |
Logical. Whether to include Fourier terms (default: TRUE). |
level |
Numeric. Confidence level of the long-run coefficient intervals (default: 0.95). Test decisions are made at the 5% level. |
horizon |
Not used; kept for compatibility with earlier versions (no dynamic multipliers are computed). |
unconditional |
Logical. If |
kgrid |
Grid of candidate Fourier frequencies when k* is selected:
|
kstar |
Optional Fourier frequency fixed by the user in advance
(requires |
lags |
Optional list with elements |
seed |
Optional integer seed for the bootstrap; the random number
generator state of the session is restored afterwards. With
|
Model. The equilibrium-correction model regresses
on , , lagged
differences of , the differences of each regressor at lags 0 (1
if unconditional = TRUE) to , the Fourier terms
and , a constant and, in
PSS cases 4 and 5, a linear trend. The overall F test (Fov) restricts the
lagged levels, together with the intercept in case 2 and the trend in case
4; t is the t statistic on and Find the F test on the
lagged regressors.
Selection. Step 1: unless kstar is given,
minimises the sum of squared residuals of the model with every lag at
maxlag. With kgrid = "integer" the candidates are
maxk, the integer frequencies chosen by minimum SSR
in Enders and Lee (2012); with kgrid = "fractional" they are
maxk. The integer default, and whether the
fractional grid is appropriate, are package choices pending verification
against Yilanci, Bozoklu and Gorus (2020) and Omay (2015). Step 2: unless
lags is given, (1 to maxlag) and each (0
to maxlag) minimise the AIC or BIC with fixed.
Bounds (type = "fardl"). Without Fourier terms
(fourier = FALSE) Fov and t are compared with the finite-sample
critical values and approximate p-values of Kripfganz and Schneider
(2020), for the sample size, the number of regressors and the number of
short-run coefficients, and the 5% bounds decision is reported. With
Fourier terms no valid bounds exist: no p-values and no decision are
given, and the bounds printed are the bounds for the model without
Fourier terms (short-run coefficients counted without the Fourier terms);
they are not valid with Fourier terms. Use a bootstrap type for
inference. Find has no tabulated distribution.
Bootstrap ("fbardl_bvz", "fbardl_mcnown"). The
bootstrap uses the recursive engine shared with the package ardlverse
(file R/ardl_boot_engine.R, engine version 1.1.0). Once, on the
data: the restricted equation for (under the null of each
statistic) and the equation for are estimated with the
selected (or fixed) , and , and their residuals
are saved. "fbardl_bvz" follows Bertelli, Vacca and Zoia (2022,
Section 3): separate nulls for Fov, t and Find, the marginal VECM for
( and lags of and
), and initial values drawn as a random block of the data.
"fbardl_mcnown" uses the null of Fov for all statistics (McNown,
Sam and Goh, 2018, Steps 1 to 8); MSG write the equation for
without the contemporaneous differences (their eq. 12), which is the form
used with unconditional = TRUE; with the default conditional ECM,
applying their joint null to it is a package choice. The
equation is unrestricted (it also contains ),
and the initial values are the first observations of the data (with
"fbardl_bvz" the levels in the random block start the recursion).
In each replication: (1) the residual pairs are resampled with
replacement and recentred (after each draw for "fbardl_bvz"; once,
before resampling, for "fbardl_mcnown"); (2) and
are generated recursively from the estimated equations, with
the Fourier terms (at the data's ) and the trend held fixed; (3)
is selected again on the bootstrap sample by Step 1 (unless
kstar is given or fourier = FALSE) and the lags by Step 2
(unless lags is given); (4) the model is estimated with the
selected specification and Fov, t and Find are computed exactly as on the
data. Repeating the selection in each replication is a package choice
(BVZ step 5(c) re-estimates the unrestricted model but does not discuss
re-selection; McNown, Sam and Goh do not discuss it either); it makes the bootstrap distribution account for the data-based selection.
In the package's Monte Carlo experiments (n = 100, independent random
walks, maxlag = 1, 200 samples, 199 replications, 5% level), the
default call gave sizes 0.075 (Fov), 0.135 (t), 0.110 (Find) and 0.040
for the combined decision; holding and the lags fixed at their
data-selected values (fbardl 1.1.0) gave 0.375, 0.420 and 0.270. With
unconditional = TRUE the generating equation for
also omits the contemporaneous differences of the regressors, so the
bootstrap model is the estimated model in both forms. P-values are the shares of bootstrap statistics at
least as extreme as the observed one; critical values are order
statistics (MSG eqs. 15-16, BVZ eqs. 24-25). The decision (5% level)
requires Fov, t and Find to reject. Fov rejecting and t not is the
degenerate case of the first type (whatever Find gives); Fov and t
rejecting and Find not is the degenerate case of the second type
(terminology of Bertelli, Vacca and Zoia 2022, eqs. 8-9; McNown, Sam and
Goh 2018 number the two degenerate cases the other way). The same labels
are used for both bootstrap types. Failed replications are set to NA and counted.
The run time grows with reps, maxlag, the number of
regressors and the frequency grid, because the selection is repeated in
every replication; fixing kstar and lags removes it.
An object of class "fbardl" containing:
Named vector of estimated coefficients
Standard errors of coefficients
t-statistics
p-values
Long-run coefficient estimates with standard errors
Short-run coefficient estimates
Error correction coefficient (speed of adjustment)
Selected (or fixed) lag order for the dependent variable
Selected (or fixed) lag orders for the independent variables
Selected (or fixed) Fourier frequency
Frequency grid used, whether k* and the lags were fixed by the user, and the SSR of each candidate frequency
F-statistic for overall cointegration test
t-statistic on lagged dependent variable
F-statistic on lagged independent variables
Cointegration test results: p-values, critical
values, decision (text) and decision.code; for the
bootstrap types also the bootstrap distributions (Fov.boot,
t.boot, Find.boot), the numbers of valid and failed
replications, reselect (what was selected again in each
replication) and dgpcheck
Diagnostic test results
Model fit statistics (R2, AIC, BIC, etc.)
Model residuals
Fitted values
Number of observations
The matched call
Bertelli, S., Vacca, G. and Zoia, M. (2022). Bootstrap cointegration tests in ARDL models. Economic Modelling, 116, 105987. doi:10.1016/j.econmod.2022.105987
Enders, W. and Lee, J. (2012). A unit root test using a Fourier series to approximate smooth breaks. Oxford Bulletin of Economics and Statistics, 74(4), 574-599. doi:10.1111/j.1468-0084.2011.00662.x
Kripfganz, S. and Schneider, D. C. (2020). Response surface regressions for critical value bounds and approximate p-values in equilibrium correction models. Oxford Bulletin of Economics and Statistics, 82(6), 1456-1481. doi:10.1111/obes.12377
McNown, R., Sam, C. Y. and Goh, S. K. (2018). Bootstrapping the autoregressive distributed lag test for cointegration. Applied Economics, 50(13), 1509-1521. doi:10.1080/00036846.2017.1366643
Omay, T. (2015). Fractional frequency flexible Fourier form to approximate smooth breaks in unit root testing. Economics Letters, 134, 123-126. doi:10.1016/j.econlet.2015.07.010
Pesaran, M. H., Shin, Y. and Smith, R. J. (2001). Bounds testing approaches to the analysis of level relationships. Journal of Applied Econometrics, 16(3), 289-326. doi:10.1002/jae.616
Yilanci, V., Bozoklu, S. and Gorus, M. S. (2020). Are BRICS countries pollution havens? Evidence from a bootstrap ARDL bounds testing approach with a Fourier function. Sustainable Cities and Society, 55, 102035. doi:10.1016/j.scs.2020.102035
data(fbardl_data) # Bootstrap (Bertelli, Vacca and Zoia), k* and lags selected again in # each replication; few replications to keep the example short result <- fbardl(y ~ x1 + x2, data = fbardl_data, maxlag = 2, maxk = 3, reps = 49, seed = 1) result # McNown, Sam and Goh bootstrap with k* and lags fixed in advance result_msg <- fbardl(y ~ x1 + x2, data = fbardl_data, type = "fbardl_mcnown", kstar = 1, lags = list(p = 1, q = c(1, 1)), reps = 99, seed = 1) summary(result_msg) # Bounds test without Fourier terms result_bounds <- fbardl(y ~ x1 + x2, data = fbardl_data, type = "fardl", fourier = FALSE)data(fbardl_data) # Bootstrap (Bertelli, Vacca and Zoia), k* and lags selected again in # each replication; few replications to keep the example short result <- fbardl(y ~ x1 + x2, data = fbardl_data, maxlag = 2, maxk = 3, reps = 49, seed = 1) result # McNown, Sam and Goh bootstrap with k* and lags fixed in advance result_msg <- fbardl(y ~ x1 + x2, data = fbardl_data, type = "fbardl_mcnown", kstar = 1, lags = list(p = 1, q = c(1, 1)), reps = 99, seed = 1) summary(result_msg) # Bounds test without Fourier terms result_bounds <- fbardl(y ~ x1 + x2, data = fbardl_data, type = "fardl", fourier = FALSE)
A simulated time series dataset suitable for demonstrating the
Fourier Bootstrap ARDL cointegration testing procedure. The data
contains a dependent variable y and two independent variables
x1 and x2 with a cointegrating relationship and
structural breaks.
fbardl_datafbardl_data
A data frame with 150 observations and 3 variables:
Dependent variable (simulated I(1) series)
First independent variable (simulated I(1) series)
Second independent variable (simulated I(1) series)
The data is generated from a data-generating process (DGP) that includes:
A long-run cointegrating relationship:
Short-run dynamics with AR(1) errors
A structural break modeled by Fourier terms
Error correction mechanism with adjustment speed of -0.3
This dataset is designed to produce clear cointegration test results
when analyzed with the fbardl function.
Simulated data for package demonstration.
data(fbardl_data) head(fbardl_data) summary(fbardl_data) # Plot the series ts.plot(ts(fbardl_data), col = 1:3, lty = 1:3) legend("topleft", colnames(fbardl_data), col = 1:3, lty = 1:3)data(fbardl_data) head(fbardl_data) summary(fbardl_data) # Plot the series ts.plot(ts(fbardl_data), col = 1:3, lty = 1:3) legend("topleft", colnames(fbardl_data), col = 1:3, lty = 1:3)