MyNixOS website logo
Description

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) <doi:10.1016/j.resourpol.2016.04.004> and Balcilar et al. (2016) <doi:10.1007/s11079-016-9388-x>.

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.

Metadata

Version

0.1.0

License

Unknown

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows