Package {fbardl}


Type: Package
Title: Fourier Bootstrap ARDL Cointegration Test
Version: 1.2.0
Date: 2026-10-03
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.
License: GPL-3
Encoding: UTF-8
Depends: R (≥ 3.5.0)
Imports: stats
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown
LazyData: true
Config/testthat/edition: 3
RoxygenNote: 7.3.3
URL: https://github.com/muhammedalkhalaf/fbardl
BugReports: https://github.com/muhammedalkhalaf/fbardl/issues
NeedsCompilation: no
Packaged: 2026-10-03 16:12:50 UTC; root
Author: Muhammad Alkhalaf ORCID iD [aut, cre, cph]
Maintainer: Muhammad Alkhalaf <muhammedalkhalaf@gmail.com>
Repository: CRAN
Date/Publication: 2026-10-10 08:00:09 UTC

fbardl: 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.

The fbardl package implements ARDL bounds tests for cointegration (Pesaran, Shin and Smith, 2001) with optional Fourier terms for smooth breaks and recursive bootstrap critical values (McNown, Sam and Goh, 2018; Bertelli, Vacca and Zoia, 2022). With Fourier terms only the bootstrap types give valid inference.

Main Function

Test Types

Data

Author(s)

Maintainer: Muhammad Alkhalaf muhammedalkhalaf@gmail.com (ORCID) [copyright holder]

Authors:

References

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

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

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

See Also

Useful links:


Fourier Bootstrap ARDL Cointegration Test

Description

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).

Usage

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
)

Arguments

formula

A formula of the form y ~ x1 + x2 + ... specifying the dependent and independent variables.

data

A data frame containing the time series variables.

type

Character string specifying the test type:

  • "fbardl_bvz" (default): bootstrap with separate nulls (Bertelli, Vacca and Zoia, 2022)

  • "fbardl_mcnown": bootstrap with the null of the overall F test for all statistics (McNown, Sam and Goh, 2018)

  • "fardl": Kripfganz and Schneider (2020) bounds; valid only without Fourier terms (see Details)

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: "aic" (default) or "bic".

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 TRUE, the contemporaneous differences of the regressors are excluded from the estimated model, as in the simulation model of McNown, Sam and Goh (2018, eq. 12). Default FALSE.

kgrid

Grid of candidate Fourier frequencies when k* is selected: "integer" (default), k = 1, \dots, maxk, or "fractional", k = 0.1, 0.2, \dots, maxk (the only grid of fbardl 1.1.0 and earlier). See Details.

kstar

Optional Fourier frequency fixed by the user in advance (requires fourier = TRUE). It is then not selected, neither on the data nor in the bootstrap.

lags

Optional list with elements p (number of lagged differences of y) and q (highest lag of the differences of each regressor, one value per regressor or a single value for all) fixing the lags in advance. They are then not selected, neither on the data nor in the bootstrap.

seed

Optional integer seed for the bootstrap; the random number generator state of the session is restored afterwards. With NULL (default) the session's generator is used.

Details

Model. The equilibrium-correction model regresses \Delta y_t on y_{t-1}, x_{t-1}, p lagged differences of y, the differences of each regressor at lags 0 (1 if unconditional = TRUE) to q_j, the Fourier terms \sin(2\pi k^* t/T) and \cos(2\pi k^* t/T), 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 y_{t-1} and Find the F test on the lagged regressors.

Selection. Step 1: unless kstar is given, k^* minimises the sum of squared residuals of the model with every lag at maxlag. With kgrid = "integer" the candidates are 1, \dots, maxk, the integer frequencies chosen by minimum SSR in Enders and Lee (2012); with kgrid = "fractional" they are 0.1, 0.2, \dots, 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, p (1 to maxlag) and each q_j (0 to maxlag) minimise the AIC or BIC with k^* 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 \Delta y (under the null of each statistic) and the equation for \Delta x are estimated with the selected (or fixed) k^*, p and q, 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 \Delta x (x_{t-1} and p lags of \Delta y and \Delta x), 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 y 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 \Delta x equation is unrestricted (it also contains y_{t-1}), 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) x^* and y^* are generated recursively from the estimated equations, with the Fourier terms (at the data's k^*) and the trend held fixed; (3) k^* 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 k^* 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 \Delta y 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.

Value

An object of class "fbardl" containing:

coefficients

Named vector of estimated coefficients

std.errors

Standard errors of coefficients

t.values

t-statistics

p.values

p-values

long.run

Long-run coefficient estimates with standard errors

short.run

Short-run coefficient estimates

ecm.coef

Error correction coefficient (speed of adjustment)

best.p

Selected (or fixed) lag order for the dependent variable

best.q

Selected (or fixed) lag orders for the independent variables

best.kstar

Selected (or fixed) Fourier frequency

kgrid, kstar.fixed, lags.fixed, ssr.by.k

Frequency grid used, whether k* and the lags were fixed by the user, and the SSR of each candidate frequency

F.overall

F-statistic for overall cointegration test

t.dependent

t-statistic on lagged dependent variable

F.independent

F-statistic on lagged independent variables

cointegration

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

diagnostics

Diagnostic test results

model.fit

Model fit statistics (R2, AIC, BIC, etc.)

residuals

Model residuals

fitted.values

Fitted values

nobs

Number of observations

call

The matched call

References

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

Examples


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)



Example Data for Fourier Bootstrap ARDL Analysis

Description

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.

Usage

fbardl_data

Format

A data frame with 150 observations and 3 variables:

y

Dependent variable (simulated I(1) series)

x1

First independent variable (simulated I(1) series)

x2

Second independent variable (simulated I(1) series)

Details

The data is generated from a data-generating process (DGP) that includes:

This dataset is designed to produce clear cointegration test results when analyzed with the fbardl function.

Source

Simulated data for package demonstration.

See Also

fbardl

Examples

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)