correlation_analyze {aniSNA} | R Documentation |
To perform correlation analysis for node-level network metrics
Description
To perform correlation analysis for node-level network metrics
Usage
correlation_analyze(
network,
n_simulations = 10,
subsampling_proportion = c(0.1, 0.3, 0.5, 0.7, 0.9),
network_metrics_functions_list = c(degree = function(net, sub_net) igraph::degree(net,
v = igraph::V(sub_net)$name), strength = function(net, sub_net) igraph::strength(net,
v = igraph::V(sub_net)$name), betweenness = function(net, sub_net)
igraph::betweenness(net, v = igraph::V(sub_net)$name), clustering_coefficient =
function(net, sub_net) igraph::transitivity(net, type = "local", vids =
igraph::V(sub_net)$name), eigenvector_centrality = function(net, sub_net)
igraph::eigen_centrality(net)$vector[igraph::V(sub_net)$name])
)
Arguments
network |
An igraph graph object consisting of observed network |
n_simulations |
Number of sub-samples to be obtained at each level |
subsampling_proportion |
A vector depicting proportions of sub-sampled nodes |
network_metrics_functions_list |
A list consisting of function definitions of the network metrics that the user wants to evaluate. Each element in the list should have an assigned name. Each function definition should include two parameters, one for the main network and another one for the subnetwork. See default example. Default = c("degree" = function(net, sub_net) igraph::degree(net, v = igraph::V(sub_net)$name), "strength" = function(net, sub_net) igraph::strength(net, v = igraph::V(sub_net)$name), "betweenness" = function(net, sub_net) igraph::betweenness(net, v = igraph::V(sub_net)$name), "clustering_coefficient" = function(net, sub_net) igraph::transitivity(net, type = "local", vids = igraph::V(sub_net)$name), "eigenvector_centrality" = function(net, sub_net) igraph::eigen_centrality(net)$vector[igraph::V(sub_net)$name]) |
Value
A list of network metrics of class list_correlation_matrices. Each element of list is a matrix whose columns correspond to subsampling_proportion and rows correspond to n_simulations. The entries of the matrix provide value of correlation between the nodes in full network and the sub-sampled network for the corresponding metric.
Examples
data(elk_network_2010)
elk_correlation_analysis <- correlation_analyze(elk_network_2010)
plot(elk_correlation_analysis)