Learn R Programming

NetworkToolbox (version 1.1.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"), plot = FALSE)

Arguments

A

An adjacency matrix of network A

B

An adjacency matrix of network B

corr

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

plot

Should there be a plot of the replicated weights? Defaults to FALSE. Set to TRUE for a plot to be produced

Value

Returns a list of the edges that replicated and their weights (replicatedEdges), number of edges that replicate (replicated), total number of edges (totalEdgesA & totalEdgesB), the percentage of edges that replicate (percentageA & percentageB), the density of edges (densityA & densityB), the mean difference between edges that replicate (meanDifference), the sd of the difference between edges that replicate (sdDifference), and the correlation between the edges that replicate for both networks (correlation)

Examples

Run this code
# NOT RUN {
A<-TMFG(neoOpen)$A

B<-MaST(neoOpen)

edges<-edgerep(A,B)
# }

Run the code above in your browser using DataLab