Description Usage Arguments Details Value Author(s) Examples
View source: R/granger_tests.R
This function takes two signals collected at the same irregularly spaced intervals and performs a Granger-Causal test for the required alternative hypothesis (i.e. one signal Granger-causes the other or both signals Granger-cause each other). See Heerah et al., 2020 for more details on the procedure.
1 2 3 4 5 6 7 8 9 10 | granger_test(
root,
shoot,
times,
theta = NULL,
alternative = "twodir",
H = 100,
seed = 123,
showprogress = TRUE
)
|
root |
A |
shoot |
A |
times |
A |
theta |
A |
alternative |
A |
H |
A positive |
seed |
A positive |
showprogress |
A |
The procedure is based on the work in Heerah et al., 2020 where the null hypothesis states that "neither of the signals Granger-causes the other". According to the alternative hypothesis specified by the user, the function computes the corresponding p-value using a parametric bootstrap procedure. If the null hypothesis is rejected in favour of the alternative, then the user can obtain information on (i) how strong the impact of a signal on the other is and (ii) its direction (positive or negative) also referred to as "intensity" (represented by psi) as well as the time point at which this impact is maximal also referred to as "impact time" (represented by gamma).
A list with the following objects:
The code of the alternative hypothesis that is tested.
The test statistic used to perform the Granger-Causal test.
The p-value computed using the bootstrap distribution under the null hypothesis.
The parameters of "intensity" and "time of impact" for the alternative hypothesis that is tested.
Roberto Molinari and Stephane Guerrier
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.