Granger.conditional {grangers} | R Documentation |
Conditional Granger-causality estimation
Description
Conditional Granger-causality spectrum was first defined in Geweke (1984). It
measures the strength of the causal link from time series y
to time series x
once
removed the mediating effect of z
in the frequency domain. Differently from function
Granger.unconditional
, this function provides only the unidirectional
causality from y
to x
. Here we need to estimate two VAR models: the first on x
and z
, the
second on x
, y
, z
, by package vars. Parameters specified for function VAR hold for
both estimations. For computational details we refer to Ding et al. (2006).
Usage
Granger.conditional(x, y, z, ic.chosen = "SC", max.lag = min(4,
length(x) - 1), plot = F, type.chosen = "none", p1 = 0, p2 = 0)
Arguments
x |
univariate time series. |
y |
univariate time series (of the same length of |
z |
univariate time series (of the same length of |
ic.chosen |
estimation method parameter |
max.lag |
maximum number of lags |
plot |
logical; if TRUE, it returns the plot of conditional Granger-causality spectrum. Defaults to FALSE. |
type.chosen |
parameter |
p1 |
parameter |
p2 |
parameter |
Details
Granger.conditional
calculates the Granger-causality conditional spectrum of a
time series x
(effect variable) on a time series z
(conditioning variable) respect
to a time series y
(cause variable). It requireNamespaces package vars.
Value
frequency
: frequencies used by Fast Fourier Transform.
n
: time series length.
Conditional_causality_y.to.x.on.z
: computed conditional Granger-causality from y
to x
on z
.
roots_1
: the roots of the estimated VAR on x
and y
.
roots_2
: the roots of the estimated VAR on x
, y
and z
.
The result is returned invisibly if plot is TRUE.
Author(s)
Matteo Farne', matteo.farne2@unibo.it
References
Geweke J., 1984. Measures of conditional linear dependence and feedback between time series. J. Am. Stat. Assoc. 79, 907–915.
Ding, M., Chen, Y., Bressler, S.L., 2006. Granger Causality: Basic Theory and Application to Neuroscience, Chap.17. Handbook of Time Series Analysis Recent Theoretical Developments and Applications.
Farne', M., Montanari, A., 2018. A bootstrap test to detect prominent Granger-causalities across frequencies. <arXiv:1803.00374>, Submitted.
See Also
VAR
.
Examples
RealGdp.rate.ts<-euro_area_indicators[,1]
m3.rate.ts<-euro_area_indicators[,2]
hicp.rate.ts<-euro_area_indicators[,4]
cond_m3.to.gdp.by.hicp<-
Granger.conditional(RealGdp.rate.ts,m3.rate.ts,hicp.rate.ts,"SC",4)