HDGC_HVAR_multiple_pairs: Test multiple pairs Granger causality in High Dimensional...

View source: R/HDGC_HVAR_multiple_pairs.R

HDGC_HVAR_multiple_pairsR Documentation

Test multiple pairs Granger causality in High Dimensional HVARs

Description

A wrapper around HDGC_HVAR_multiple. If GCpairs is used, the function is the same as HDGC_HVAR_multiple. Alternatively, if a we want to test all combinations between variables in GCto and GCfrom, these can be given directly. See Example.

Usage

HDGC_HVAR_multiple_pairs(
  data,
  GCpairs = NULL,
  GCto = NULL,
  GCfrom = NULL,
  log = TRUE,
  bound = 0.5 * nrow(data),
  parallel = FALSE,
  n_cores = NULL
)

Arguments

data

the data matrix or something that can be coerced to a matrix containing (stationary) realized volatilities

GCpairs

it should contain a nested list. The outer list is all the pairs to be considered. The inner list contains the GCto and GCfrom vectors needed for HDGC_HVAR. See HDGC_HVAR_multiple.

GCto

all combination variables Granger caused

GCfrom

all combination variables Granger causing

log

default is TRUE, if the realized volatilities are already log transformed then put to FALSE

bound

lower bound on tuning parameter lambda

parallel

TRUE for parallel computing

n_cores

nr of cores to use in parallel computing, default is all but one

Value

Granger causality matrix and Lasso selections are printed to the console

References

Hecq, A., Margaritella, L., Smeekes, S., "Granger Causality Testing in High-Dimensional VARs: a Post-Double-Selection Procedure." arXiv preprint arXiv:1902.10991 (2019).

Corsi, Fulvio. "A simple approximate long-memory model of realized volatility." Journal of Financial Econometrics 7.2 (2009): 174-196.

Examples

## Not run: GCto = list(c("Var 1", "Var 2")); GCfrom = list(c("Var 3", "Var 4", "Var 5"))
## Not run: HDGC_HVAR_multiple_pairs(sample_RV,GCto,GCfrom, log=TRUE)

Marga8/HDGCvar documentation built on May 25, 2024, 11:12 a.m.