I have been trying to perform the “Nonlinear Granger causality test in R” however I didn't understand specific parameters ( LayersUniv, LayersBiv) from the below formula.
What values do I need to insert in “ LayersUniv, LayersBiv”. What is the purpose of these parameters?
LayersUniv: Integer vector that contains the size of hidden layers of the univariate model. The length of this vector is the number of hidden layers, and the i-th element is the number of neurons in the i-th hidden layer.
LayersBiv: Integer vector that contains the size of hidden layers of the bivariate model. The length of this vector is the number of hidden layers, and the i-th element is thenumber of neurons in the i-th hidden layer.casaulity.test)
See, also, the example
library (timeSeries) # to extract time series
#> Loading required package: timeDate
library (NlinTS)
#> Loading required package: Rcpp
data = LPP2005REC
model = nlin_causality.test (data[,1], data[,2], 2, c(2), c(4),iters=20)
model$summary ()
#> ---------------------------------------------------------
#> The non-linear Granger causality test
#> ---------------------------------------------------------
#> The lag parameter: p = 2
#> The Granger causality Index: GCI = 0
#> The value of the F-test: -0.00597521
#> The p_value of the F-test: 1
#> The critical value at 5% of risk: 1.746
The lag parameter: p = 2
The Granger causality Index: GCI = 0.00457014
The value of the F-test: -0.185514
The p_value of the F-test: 1
The critical value at 5% of risk: 1.718
So, based on the above result, what does it says? The P-value of the F-test is 1(I feel it shows a very bigger value).
The arguments are not to be found—they are to be given; they specify the depth of the hidden model to use. Vary the arguments to the example to see how the F-test varies.
The interpretation of the p_value of the F-test turns on understanding H0, the null hypothesis.
Two MLP artificial neural networks are evaluated to perform the test, one using just the target time series (ts1), and the second using
both time series. The null hypothesis of this test is that the second time series does not cause the first one.
Beginning with a predetermined \alpha, say 0.05, HO is rejected if the p_value for the F-test is greater than \alpha. At the 1-\alpha confidence level, we say that HO can be rejected for all p_values \gt\alpha in favor of the alternative hypothesis H1 that ts2 does cause ts1.
p_values are bounded in the interval [1-\inf), so a p_value > 1 is not to be expected.
The example is correctly specified formally, in that it contains the required arguments. Whether it is right is a matter of domain knowledge. Is the result surprising? Does the nature of the time series lead one to expect a causal relationship? Do different combinations of values for the hidden layers give rise to different results. Do those differences have a real-world interpretation?