Learn R Programming

tna (version 1.5.8)

betweenness_network: Build and Visualize a Network with Edge Betweenness

Description

This function builds a network from a transition matrix in a tna object and computes edge betweenness for the network.

Usage

betweenness_network(x, directed = TRUE, invert = TRUE)

# S3 method for tna betweenness_network(x, directed = TRUE, invert = TRUE)

# S3 method for group_tna betweenness_network(x, directed = TRUE, invert = TRUE)

Value

A tna object where the edge weights are edge betweenness values. For a group_tna object, a group_tna object of such networks, one per group.

Arguments

x

A tna or a group_tna object.

directed

A logical value. If TRUE, the network is considered directed.

invert

A logical value indicating whether the weights should be inverted for distance-based measures. The default is TRUE.

Details

The returned model remembers the model it was built from (its type and scaling) and the values of directed and invert. The resampling methods permutation_test(), bootstrap(), and estimate_cs() use this information: every resample rebuilds the original transition network from the resampled sequences and then recomputes edge betweenness. For example, permutation_test() applied to two edge betweenness networks tests the differences in edge betweenness between the two groups. As for any network of a grouped model with scaled edge weights, the edge betweenness networks of such a model are not resampled.

See Also

Centrality measure functions centralities(), plot.group_tna_centralities(), plot.tna_centralities(), print.group_tna_centralities(), print.tna_centralities()

Examples

Run this code
model <- tna(group_regulation)
betweenness_network(model)

# Compare edge betweenness between groups
models <- group_tna(
  group_regulation,
  group = rep(c("first", "second"), each = 1000)
)
# Small number of iterations for CRAN
permutation_test(betweenness_network(models), iter = 20)

Run the code above in your browser using DataLab