Nonparametric Causality in Quantiles Test

Implements the nonparametric causality-in-quantiles test (in mean or variance), returning a test object with an S3 plot() method. The current implementation uses one lag of each series (first-order Granger causality setup). Methodology is based on Balcilar, Gupta, and Pierdzioch (2016a) and Balcilar et al. (2016) .


nonParQuantileCausality

Implements the nonparametric causality-in-quantiles test.

Lag order: first-order only (uses $x_{t-1}$ and $y_{t-1}$).

Install (dev)

# install.packages("devtools")
devtools::install_github("https://github.com/mbalcilar/nonParQuantileCausality")

Example

library(nonParQuantileCausality)
set.seed(1)
x <- arima.sim(n = 600, list(ar = 0.4))
y <- 0.5*dplyr::lag(x, 1) + rnorm(600)  # if dplyr present; otherwise build your own lag
y[is.na(y)] <- mean(y, na.rm = TRUE)

obj <- np_quantile_causality(x, y, type = "mean", q = seq(0.1, 0.9, 0.1))
plot(obj)
library(nonParQuantileCausality)
data(gold_oil)

obj <- np_quantile_causality(
  x = gold_oil$Oil, y = gold_oil$Gold,
  type = "mean", q = seq(0.05, 0.95, 0.05)
)
plot(obj)

References

  • Balcilar, M., Gupta, R., & Pierdzioch, C. (2016). Does uncertainty move the gold price? New evidence from a nonparametric causality-in-quantiles test. Resources Policy, 49, 74–80.

  • Balcilar, M., Gupta, R., Kyei, C., & Wohar, M. E. (2016). Does economic policy uncertainty predict exchange rate returns and volatility? Evidence from a nonparametric causality-in-quantiles test. Open Economies Review, 27(2), 229–250.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("nonParQuantileCausality")

0.1.0 by Mehmet Balcilar, a year ago


https://www.mbalcilar.net, https://github.com/mbalcilar/nonParQuantileCausality


Browse source code at https://github.com/cran/nonParQuantileCausality


Authors: Mehmet Balcilar [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports stats, ggplot2, quantreg, KernSmooth

Suggests knitr, rmarkdown, testthat


See at CRAN