Welcome to ClientVPS Mirrors

Help for package mvardlurt
Type: Package
Title: Multivariate ARDL Unit Root Test
Version: 1.0.2
Description: Implements the multivariate autoregressive distributed lag (ARDL) unit root test proposed by Sam, McNown, Goh, and Goh (2024) <doi:10.1080/03796205.2024.2439101>. The test augments the standard ADF regression with lagged levels of a covariate to improve power when cointegration exists. Bootstrap critical values ensure correct size regardless of nuisance parameters. Provides automatic lag selection via AIC/BIC, diagnostic tests, and comprehensive inference tables following the four-case framework.
License: GPL-3
URL: https://github.com/muhammedalkhalaf/mvardlurt
BugReports: https://github.com/muhammedalkhalaf/mvardlurt/issues
Encoding: UTF-8
RoxygenNote: 7.3.2
Depends: R (≥ 4.0.0)
Imports: grDevices, graphics, stats, utils
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2026-03-09 17:54:26 UTC; acad_
Author: Muhammad Alkhalaf ORCID iD [aut, cre, cph]
Maintainer: Muhammad Alkhalaf <muhammedalkhalaf@gmail.com>
Repository: CRAN
Date/Publication: 2026-03-16 15:50:10 UTC

Multivariate ARDL Unit Root Test

Description

Implements the multivariate autoregressive distributed lag (ARDL) unit root test proposed by Sam, McNown, Goh, and Goh (2024). The test augments the standard ADF regression with lagged levels of a covariate to improve power when cointegration exists. Bootstrap critical values ensure correct size regardless of nuisance parameters.

Details

The main function is mvardlurt, which performs the multivariate ARDL unit root test. The package provides:

The test produces two statistics:

The four-case framework interprets results as:

Author(s)

Muhammad Alkhalaf

References

Sam, C. Y., McNown, R., Goh, S. K., & Goh, K. L. (2024). A multivariate autoregressive distributed lag unit root test. Studies in Economics and Econometrics, 1-17. doi:10.1080/03796205.2024.2439101

See Also

mvardlurt

Examples

# Generate cointegrated data
set.seed(123)
n <- 200
x <- cumsum(rnorm(n))
y <- 0.5 * x + rnorm(n, sd = 0.5)

# Run the test
result <- mvardlurt(y, x, case = 3, reps = 200)
print(result)

Create a Combined Diagnostic Plot for mvardlurt Objects

Description

Creates a 2x2 panel of diagnostic plots for the multivariate ARDL unit root test including residuals vs fitted, Q-Q plot, residuals over time, and ACF.

Usage

## S3 method for class 'mvardlurt'
autoplot(x, ...)

Arguments

x

An object of class "mvardlurt".

...

Additional arguments passed to plotting functions.

Value

Invisibly returns x.

Author(s)

Muhammad Alkhalaf

See Also

mvardlurt, plot.mvardlurt

Examples

set.seed(123)
n <- 100
x <- cumsum(rnorm(n))
y <- 0.5 * x + rnorm(n, sd = 0.5)

result <- mvardlurt(y, x, reps = 100)
autoplot.mvardlurt(result)

Multivariate ARDL Unit Root Test

Description

Implements the multivariate autoregressive distributed lag (ARDL) unit root test proposed by Sam, McNown, Goh, and Goh (2024). The test augments the standard ADF regression with lagged levels of a covariate (independent variable) to improve power, especially when cointegration exists. Bootstrap critical values ensure correct size regardless of nuisance parameters.

Usage

mvardlurt(y, x, case = 3L, maxlag = 10L, ic = "aic",
          fixlag = NULL, reps = 1000L, level = 0.95,
          seed = 12345L, boot = TRUE)

Arguments

y

A numeric vector or time series. The dependent variable.

x

A numeric vector or time series. The independent variable (covariate).

case

Integer. Deterministic specification:

  • 1: No deterministic terms

  • 3: Intercept only (default)

  • 5: Intercept and linear trend

maxlag

Integer. Maximum lag order for AIC/BIC selection. Default is 10. Must be between 0 and 10.

ic

Character. Information criterion for lag selection: "aic" (default) or "bic".

fixlag

Optional numeric vector of length 2, specifying fixed lag orders c(p, q) for \Delta y and \Delta x respectively. If provided, overrides automatic lag selection.

reps

Integer. Number of bootstrap replications. Default is 1000. Minimum is 100.

level

Numeric. Confidence level for inference (0 to 1). Default is 0.95.

seed

Integer. Random seed for reproducibility. Default is 12345.

boot

Logical. Whether to compute bootstrap critical values. Default is TRUE.

Details

The test estimates the following ARDL regression:

\Delta y_t = \pi y_{t-1} + \delta x_{t-1} + \sum_{j=1}^{p} \gamma_j \Delta y_{t-j} + \sum_{j=1}^{q} \theta_j \Delta x_{t-j} + deterministics + \varepsilon_t

The test produces two statistics:

Based on the four-case framework (Sam et al., 2024):

Value

An object of class "mvardlurt" containing:

tstat

t-statistic for the unit root test (on \pi)

fstat

F-statistic for the cointegration test (on \delta)

fstat_p

Asymptotic p-value for the F-statistic

pi_coef

Coefficient estimate of \pi (lagged y)

pi_se

Standard error of \pi

delta_coef

Coefficient estimate of \delta (lagged x)

delta_se

Standard error of \delta

lr_mult

Long-run multiplier -\delta/\pi (if \pi \neq 0)

opt_p

Selected lag order for \Delta y

opt_q

Selected lag order for \Delta x

case

Deterministic case used

casename

Description of the deterministic case

reps

Number of bootstrap replications

nobs

Number of observations used

aic

AIC value of the selected model

bic

BIC value of the selected model

r_squared

R-squared of the regression

t_cv

Bootstrap critical values for t-statistic (10%, 5%, 2.5%, 1%)

f_cv

Bootstrap critical values for F-statistic (10%, 5%, 2.5%, 1%)

ic_table

Matrix of IC values for all (p, q) combinations

decision

List containing test decisions and significance levels

model

The fitted lm object

y

Original dependent variable

x

Original independent variable

residuals

Residuals from the fitted model

Author(s)

Muhammad Alkhalaf

References

Sam, C. Y., McNown, R., Goh, S. K., & Goh, K. L. (2024). A multivariate autoregressive distributed lag unit root test. Studies in Economics and Econometrics, 1-17. doi:10.1080/03796205.2024.2439101

Examples

# Generate example data with cointegration
set.seed(123)
n <- 200
x <- cumsum(rnorm(n))
y <- 0.5 * x + rnorm(n, sd = 0.5)

# Run the test (reduced reps for speed)
result <- mvardlurt(y, x, case = 3, reps = 200)
print(result)

# With fixed lags
result2 <- mvardlurt(y, x, fixlag = c(2, 2), reps = 200)

Plot Method for mvardlurt Objects

Description

Creates diagnostic plots for the multivariate ARDL unit root test.

Usage

## S3 method for class 'mvardlurt'
plot(x, which = c(1, 2, 3, 4),
     ask = (length(which) > 1 && dev.interactive()), ...)

Arguments

x

An object of class "mvardlurt".

which

Integer vector indicating which plots to produce:

  • 1: Residuals vs Fitted

  • 2: Q-Q plot of residuals

  • 3: Residuals over time

  • 4: ACF of residuals

  • 5: Time series of y and x

  • 6: Information criterion surface

Default is c(1, 2, 3, 4).

ask

Logical. If TRUE, prompt before each plot. Default is TRUE when multiple plots are requested in an interactive session.

...

Additional arguments passed to plotting functions.

Value

Invisibly returns x.

Author(s)

Muhammad Alkhalaf

See Also

mvardlurt, autoplot.mvardlurt

Examples

set.seed(123)
n <- 100
x <- cumsum(rnorm(n))
y <- 0.5 * x + rnorm(n, sd = 0.5)

result <- mvardlurt(y, x, reps = 100)

# Default diagnostic plots
plot(result, ask = FALSE)

# IC surface plot
plot(result, which = 6)

Methods for mvardlurt Objects

Description

Print, summary, and accessor methods for objects of class "mvardlurt".

Usage

## S3 method for class 'mvardlurt'
print(x, ...)

## S3 method for class 'mvardlurt'
summary(object, ...)

## S3 method for class 'mvardlurt'
coef(object, ...)

## S3 method for class 'mvardlurt'
residuals(object, ...)

## S3 method for class 'mvardlurt'
fitted(object, ...)

Arguments

x

An object of class "mvardlurt".

object

An object of class "mvardlurt".

...

Additional arguments (ignored).

Value

print and summary invisibly return x/object.

coef returns a named numeric vector with pi, delta, and lr_mult.

residuals returns the numeric vector of residuals from the fitted model.

fitted returns the numeric vector of fitted values.

Author(s)

Muhammad Alkhalaf

See Also

mvardlurt

Examples

set.seed(123)
n <- 100
x <- cumsum(rnorm(n))
y <- 0.5 * x + rnorm(n, sd = 0.5)

result <- mvardlurt(y, x, reps = 100)

# Print method
print(result)

# Summary method
summary(result)

# Extract coefficients
coef(result)

# Extract residuals
head(residuals(result))

# Extract fitted values
head(fitted(result))

Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.

This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.