Learn R Programming

NetworkToolbox (version 1.4.2)

edgerep: Edge Replication

Description

Computes the number of edges that replicate between two cross-sectional networks

Usage

edgerep(A, B, corr = c("pearson", "spearman", "kendall"))

Arguments

A

An adjacency matrix of network A

B

An adjacency matrix of network B

corr

Correlation method for assessing the relationship between the replicated edge weights. Defaults to "pearson". Set to "spearman" for non-linear or monotonic associations. Set to "kendall" for rank-order correlations

Value

Returns a list containing:

replicatedEdges

The edges that replicated and their weights

replicated

Number of edges that replicated

meanDiff

The average edge weight difference between the edges that replicated

sdDiff

The standard deviation edge weight difference between the edges that replicated

cor

The correlation between the edges that replicated

Lists for each network contain:

totalEdges

Total possible number of edges to be replicated

percentage

Percentage of edges that replicated relative to total possible

density

The density of the network

Examples

Run this code
# NOT RUN {
# normal set to FALSE for CRAN tests
tmfg <- TMFG(neoOpen, normal = FALSE)$A

# normal set to FALSE for CRAN tests
mast <- MaST(neoOpen, normal = FALSE)

edges <- edgerep(tmfg, mast)

# }

Run the code above in your browser using DataLab