plot.fnets {fnets}R Documentation

Plotting the networks estimated by fnets

Description

Plotting method for S3 objects of class fnets. When display = "network" or display = "heatmap", it produces a plot visualising three networks underlying factor-adjusted VAR processes: (i) directed network representing Granger causal linkages, as given by estimated VAR transition matrices summed across the lags, (ii) undirected network representing contemporaneous linkages after accounting for lead-lag dependence, as given by partial correlations of VAR innovations, (iii) undirected network summarising (i) and (ii) as given by long-run partial correlations of VAR processes. Edge widths are determined by edge weights. When display = "tuning", it produces up to two plots (when do.larpc = TRUE) visualising the outcome of CV or IC adopted for selecting the l1-regularisation parameters and the VAR order.

Usage

## S3 method for class 'fnets'
plot(
  x,
  type = c("granger", "pc", "lrpc"),
  display = c("network", "heatmap", "tuning"),
  names = NA,
  groups = NA,
  group.colours = NA,
  ...
)

Arguments

x

fnets object

type

a string specifying which of the above three networks (i)–(iii) to visualise when display = "network" or display = "heatmap"; possible values are

"granger"

directed network representing Granger causal linkages

"pc"

undirected network representing contemporaneous linkages; available when x$do.lrpc = TRUE

"lrpc"

undirected network summarising Granger causal and contemporaneous linkages; available when x$do.lrpc = TRUE

display

a string specifying which plot to produce; possible values are

"network"

visualise the network as an igraph object, see plot.igraph

"heatmap"

visualise the network as a heatmap, see imagePlot

"tuning"

visualise the outcome from CV or IC (specified by tuning.args$tuning of fnets) for selecting l1-regularisation parameters and the VAR order

names

a character vector containing the names of the network vertices

groups

an integer vector denoting any group structure of the network vertices

group.colours

a vector denoting colours corresponding to groups

...

additional arguments

Value

A plot produced as per the input arguments

See Also

fnets

Examples


out <- fnets(data.unrestricted,
  do.threshold = TRUE,
  var.args = list(n.cores = 2)
)
plot(out, type = "granger", display = "network",
groups = rep(c(1,2), 50/2), group.colours = c("orange","blue"))
plot(out, type = "lrpc", display = "heatmap")
plot(out, display = "tuning")


[Package fnets version 0.1.6 Index]