network.fnets {fnets} | R Documentation |
Convert networks estimated by fnets into igraph objects
Description
Converts S3 objects of class fnets
into a network.
Produces an igraph object for the 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.
When plotting the network, note that the edge weights may be negative since they correspond to the entries of the estimators of VAR parameters and (long-run) partial correlations.
Usage
## S3 method for class 'fnets'
network(
object,
type = c("granger", "pc", "lrpc"),
names = NA,
groups = NA,
group.colours = NA,
...
)
Arguments
object |
|
type |
a string specifying which of the above three networks (i)–(iii) to visualise; possible values are
|
names |
a character vector containing the names of the vertices |
groups |
an integer vector denoting any group structure of the vertices |
group.colours |
a vector denoting colours corresponding to |
... |
additional arguments to |
Value
a list containing
network |
|
names |
input argument |
groups |
input argument |
grp.col |
vector of colours corresponding to each node |
... |
additional arguments to |
See Also
Examples
out <- fnets(data.unrestricted,
do.threshold = TRUE,
var.args = list(n.cores = 2)
)
net <- network(out, type = "granger")$network
plot(net, layout = igraph::layout_in_circle(net))
network(out, type = "pc")
network(out, type = "lrpc")