| granger_matrix | R Documentation |
Computes pairwise Granger causality tests for all variable pairs.
granger_matrix(object)
object |
An |
A matrix of p-values for all pairwise Granger causality tests. Row i, column j contains the p-value for "variable j causes variable i".
# Generate example data
set.seed(123)
n <- 100
mydata <- data.frame(x = cumsum(rnorm(n)), y = cumsum(rnorm(n)))
fit <- rbfmvar(mydata, lags = 2)
granger_matrix(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.