Stability: estimate the edge weight and node stability of a network.

View source: R/Stability.R

StabilityR Documentation

estimate the edge weight and node stability of a network.

Description

estimate the edge weight and node stability of a network.

Usage

Stability(
  data,
  nboot = 1000,
  ncore = 1,
  labels = NULL,
  add.bridge = FALSE,
  communities = NULL,
  useCommunities = "all",
  cor = 0.7
)

Arguments

data

a data frame, each column presents a node, there should be no miss values in the data frame.

nboot

number of bootstraps.

ncore

number of cores to use in computing results. Set to 1 to not use parallel computing.

labels

use self-specified node labels, typically the labels parameter you put in the quickNet function.

add.bridge

a logical value to determine whether to calculate bridge coefficients or not. If the value is TRUE, "bridgeStrength", "bridgeCloseness", "bridgeBetweenness" will be added to the results.

communities

used for bridge centrality measures. If add.bridge is set TRUE, this should be provided. see netowrktools::bridge.

useCommunities

character vector specifying which communities should be included. Default set to "all".

cor

When calculating Correlation stability coefficient, (CS-coefficient), the correlation level to test at. Default is 0.7.

Value

a list contains the stability test results of the netowrk

  • boot_edge_weight_stabilty: the bootstrap result of edge weight accuracy.

  • boot_centrality_stabilty: the bootstrap result of centrality stability.

  • edge_weight_CI_plot: the plot of edge weight CI.

  • edge_weight_diff_plot: the plot of pair-wise edge difference.

  • centrality_stability_plot: the plot of node centrality stability.

  • centrality_diff_plot: the plot of pair-wise node centrality difference.

  • CS_coefficient: the Centrality stability coefficient (CS-coefficient) of all statistics.

Examples


data('mtcars')
Stability <- Stability(mtcars, nboot = 100)

Stability2 <- Stability(mtcars, nboot = 100, add.bridge = TRUE, communities = list(c1 = 1:5, c2 = 6:11))


LeiGuo0812/quickNet documentation built on May 1, 2024, 10:42 p.m.