network.density {network}R Documentation

Compute the Density of a Network

Description

network.density computes the density of its argument.

Usage

network.density(x, na.omit=TRUE, discount.bipartite=FALSE)

Arguments

x an object of class network
na.omit logical; omit missing edges from extant edges when assessing density?
discount.bipartite logical; if x is bipartite, should “forbidden” edges be excluded from the count of potential edges?

Details

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.

Value

The network density.

Author(s)

Carter T. Butts buttsc@uci.edu

References

Wasserman, S. and Faust, K. 1994. Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.

See Also

network.edgecount, network.size

Examples

#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

[Package network version 1.3 Index]