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 |
|
type |
a string specifying which of the above three networks (i)–(iii) to visualise
when
|
display |
a string specifying which plot to produce; possible values are
|
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 |
... |
additional arguments |
Value
A plot produced as per the input arguments
See Also
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")