This function is used within the granger_test function to compute the Granger-Causal test statistic on the signals of interest as well as on the simulated ones based on the sim_proc function (see Heerah et al., 2020).

causal_stat(root, shoot, times, theta, alternative = "twodir")

Arguments

root

A double value of the vector containing the detrended and standardized measurements of the first signal (the root expressions).

shoot

A double value of the vector containing the detrended and standardized measurements of the second signal (the shoot expressions).

times

A double value of the vector collecting the times (measured in the same unit) at which the measurements were taken for both signals (root and shoot).

theta

A double value for the starting values of the parameter vector \(\theta\) of the full causal model (must be of length 8).

alternative

A character value defining the alternative hypothesis for the Granger-Causal test (with the null hypothesis always being "the signals do not Granger-cause each other"). The default value is "twodir" which tests the alternative that "both signals Granger-cause each other". The other options are "rtos" which tests the alternative "the first signal (root) Granger-causes the second signal (shoot)" and "stor" which tests the alternative "the second signal (shoot) Granger-causes the first signal (root)".

Value

A list containing the following objects:

stat

The value of the Granger-Causal test statistic for the specified alternative hypothesis HA

parameters

A double vector containing the values of the parameters relevant for the specified alternative hypothesis HA (i.e. intensity of the causal impact (\(\psi\)) and the time of maximal impact (\(\gamma\)))

Author

Roberto Molinari and Stephane Guerrier