Compute the Density of a Network
network.density
computes the density of its argument.
network.density(x, na.omit = TRUE, discount.bipartite = FALSE)
x |
an object of class |
na.omit |
logical; omit missing edges from extant edges when assessing density? |
discount.bipartite |
logical; if |
The density of a network is defined as the ratio of extant edges to
potential edges. We do not currently consider edge values; missing edges are
omitted from extent (but not potential) edge count when
na.omit==TRUE
.
The network density.
network.density
relies on network attributes (see
network.indicators) to determine the properties of the underlying
network object. If these are set incorrectly (e.g., multiple edges in a
non-multiplex network, network coded with directed edges but set to
“undirected”, etc.), surprising results may ensue.
Carter T. Butts buttsc@uci.edu
Butts, C. T. (2008). “network: a Package for Managing Relational Data in R.” Journal of Statistical Software, 24(2). https://www.jstatsoft.org/v24/i02/
Wasserman, S. and Faust, K. (1994). Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.
#Create an arbitrary adjacency matrix m<-matrix(rbinom(25,1,0.5),5,5) diag(m)<-0 g<-network.initialize(5) #Initialize the network network.density(g) #Calculate the density
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.