plot_granger function

Function to plot Granger causality networks

Function to plot Granger causality networks

A function to plot Granger causal network for each segment via estimated sparse component. Note that if it has multiple lags, it only provides the first order Granger causality plot.

plot_granger(est_mats, threshold = 0.1, layout)

Arguments

  • est_mats: A list of numeric sparse matrices, indicating the estimated sparse components for each segment
  • threshold: A numeric positive value, used to determine the threshold to present the edges
  • layout: A character string, indicates the layout for the igraph plot argument

Returns

A series of plots of Granger networks of VAR model parameters

Examples

set.seed(1) est_mats <- list(matrix(rnorm(400, 0, 1), 20, 20)) plot_granger(est_mats, threshold = 2, layout = "circle") plot_granger(est_mats, threshold = 2, layout = "star") plot_granger(est_mats, threshold = 2, layout = "nicely")
  • Maintainer: Yue Bai
  • License: GPL-2
  • Last published: 2024-06-15

Useful links