regression_slope_analyze {aniSNA}R Documentation

To perform regression analysis for local network metrics

Description

To perform regression analysis for local network metrics

Usage

regression_slope_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_regression_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 the slope of regression when the nodal values in sub-sampled network are regressed upon the values of the same nodes in the full network for the corresponding metric.

Examples


data(elk_network_2010)
elk_regression_analysis <- regression_slope_analyze(elk_network_2010)
plot(elk_regression_analysis)


[Package aniSNA version 1.1.1 Index]