caustests: Multiple Granger Causality Tests

View source: R/caustests.R

caustestsR Documentation

Multiple Granger Causality Tests

Description

Performs various Granger causality tests including Toda-Yamamoto, Fourier-based tests (single and cumulative frequency), and quantile causality tests with bootstrap inference.

Usage

caustests(
  data,
  test,
  pmax = 8,
  ic = 1,
  nboot = 1000,
  kmax = 3,
  dmax = NULL,
  quantiles = seq(0.1, 0.9, 0.1),
  verbose = TRUE
)

Arguments

data

A data frame or matrix with time series variables (columns).

test

Integer 1-7 specifying the test type:

  • 1: Toda-Yamamoto (1995)

  • 2: Single Fourier Granger (Enders & Jones, 2016)

  • 3: Single Fourier Toda-Yamamoto (Nazlioglu et al., 2016)

  • 4: Cumulative Fourier Granger (Enders & Jones, 2019)

  • 5: Cumulative Fourier Toda-Yamamoto (Nazlioglu et al., 2019)

  • 6: Quantile Toda-Yamamoto (Cai et al., 2023)

  • 7: Bootstrap Fourier Granger Causality in Quantiles (Cheng et al., 2021)

pmax

Maximum lag order for model selection (default: 8).

ic

Information criterion: 1 for AIC, 2 for SBC/BIC (default: 1).

nboot

Number of bootstrap replications (default: 1000).

kmax

Maximum Fourier frequency (default: 3, used for tests 2-5, 7).

dmax

Extra lags for Toda-Yamamoto augmentation. If NULL, automatically set to 0 for tests 2, 4 (differences) and 1 for tests 1, 3, 5, 6, 7 (levels).

quantiles

Numeric vector of quantiles for tests 6-7 (default: seq(0.1, 0.9, 0.1)).

verbose

Logical; print progress messages (default: TRUE).

Details

The package implements seven Granger causality tests:

Test 1: Toda-Yamamoto (1995) Standard Granger causality in levels using VAR with extra lags equal to the maximum integration order (dmax). This approach is robust to unknown integration and cointegration properties.

Tests 2-3: Single Fourier Frequency Incorporate a single Fourier frequency to capture smooth structural breaks. Test 2 uses first differences, Test 3 uses levels (Toda-Yamamoto style).

Tests 4-5: Cumulative Fourier Frequency Use cumulative Fourier frequencies (1 to k) for more flexible break patterns. Test 4 uses first differences, Test 5 uses levels.

Test 6: Quantile Toda-Yamamoto Extends Toda-Yamamoto to quantile regression, allowing causality analysis across different quantiles of the conditional distribution.

Test 7: Bootstrap Fourier Granger Causality in Quantiles (BFGC-Q) Combines Fourier flexibility with quantile regression for robust inference under structural breaks and across quantiles.

Value

An object of class "caustests" containing:

results

Data frame with test results for each direction

test

Test number used

test_name

Name of the test

pmax

Maximum lag considered

ic

Information criterion used

nboot

Number of bootstrap replications

kmax

Maximum Fourier frequency

dmax

Augmentation lags

quantiles

Quantiles used (for tests 6-7)

quantile_results

Detailed quantile results (for tests 6-7)

References

Toda, H. Y., & Yamamoto, T. (1995). Statistical inference in vector autoregressions with possibly integrated processes. Journal of Econometrics, 66(1-2), 225-250. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/0304-4076(94)01616-8")}

Enders, W., & Jones, P. (2016). Grain prices, oil prices, and multiple smooth breaks in a VAR. Studies in Nonlinear Dynamics & Econometrics, 20(4), 399-419. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1515/snde-2014-0101")}

Nazlioglu, S., Gormus, N. A., & Soytas, U. (2016). Oil prices and real estate investment trusts (REITs): Gradual-shift causality and volatility transmission analysis. Energy Economics, 60, 168-175. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.eneco.2016.09.009")}

Nazlioglu, S., Soytas, U., & Gormus, N. A. (2019). Oil prices and monetary policy in emerging markets: Structural shifts in causal linkages. Emerging Markets Finance and Trade, 55(1), 105-117. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/1540496X.2018.1434072")}

Cai, Y., Chang, T., Xiang, Y., & Chang, H. L. (2023). Testing Granger causality in quantiles between the stock and the foreign exchange markets of Japan. Finance Research Letters, 58, 104327. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.frl.2023.104327")}

Cheng, S. C., Hsueh, H. P., Ranjbar, O., Wang, M. C., & Chang, T. (2021). Bootstrap Fourier Granger causality test in quantiles and the asymmetric causal relationship between CO2 emissions and economic growth. Letters in Spatial and Resource Sciences, 14, 31-49. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s12076-020-00263-0")}

Examples

# Load example data
data(caustests_data)


# Test 1: Toda-Yamamoto test
result1 <- caustests(caustests_data, test = 1, nboot = 199)
print(result1)
summary(result1)

# Test 3: Single Fourier Toda-Yamamoto
result3 <- caustests(caustests_data, test = 3, kmax = 2, nboot = 199)
print(result3)

# Test 6: Quantile causality (fewer quantiles for speed)
result6 <- caustests(caustests_data, test = 6, 
                     quantiles = c(0.25, 0.50, 0.75), nboot = 199)
print(result6)



caustests documentation built on April 5, 2026, 9:06 a.m.