autoCheckGC: Granger-Causality test with automatic choice of lag structure

Description Usage Arguments

Description

This function takes an xts formatted bivariate time series as input, automatically determines the amount of lags to be used in the Granger-Causality test using an information criterion after estimating a VAR and then checks for Granger-Causality in both directions. Uses lmtest::grangertest() for the Granger-Causality testing.

Usage

1
2
autoCheckGC(x = NULL, convertToWeekly = F, lagCriterion = "AIC",
  useMinLags = F, ...)

Arguments

x

A bivariate time series of class xts

convertToWeekly

If TRUE converts the time series to weekly using xts::to.weekly(). Default FALSE

lagCriterion

The information criterion to be used when deciding on the optimal amount of lags based on the estimated VAR. "AIC" by default. Other possible values are "HQ", "SC", and "FPE". Uses vars::VARselect() to estimate the VAR.

useMinLags

If TRUE, uses the minimum amount of lags that any of the information criteria suggested. Overrides "lagCriterion". FALSE by default.

...

Other parameters to be passed on to other functions, for example to vars::VARselect().


Thie1e/convenience documentation built on May 9, 2019, 4:40 p.m.