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).
Granger.conditional(x, y, z, ic.chosen = "SC", max.lag = min(4,
length(x) - 1), plot = F, type.chosen = "none", p1 = 0, p2 = 0)univariate time series.
univariate time series (of the same length of x).
univariate time series (of the same length of x).
maximum number of lags lag.max to be passed to function VAR.
Defaults to min(4, length(x) - 1).
logical; if TRUE, it returns the plot of conditional Granger-causality spectrum. Defaults to FALSE.
parameter type to be passed to function VAR.
Defaults to ''none''. Alternatives are c(''none'',''const'',''trend'').
parameter p to be passed to function VAR.
It corresponds to the number of lags of the first VAR model. Defaults to 0.
parameter p to be passed to function VAR.
It corresponds to the number of lags of the second VAR model. Defaults to 0.
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.
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.
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.
VAR.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab