Description Usage Arguments Details Value References See Also Examples
Assortativity coefficient is a measure of segregation for social networks due to Mark Newman (2002).
1 2 3 4 5 6 7 8 9 10 |
object |
R object, see available methods |
... |
other arguments to/from other methods |
vattr |
character, name of the vertex attribute for which the measure is to be calculated |
The measure evaluates the relative prevalence of within-group ties. It is based on the contact layer of the mixing matrix.
Assortativity coefficient is 1 if all ties are within-group. The minimum can be negative, but not less than -1, and depends on the relative number of ties of nodes in different groups. If the network conforms to "proportionate mixing", the coefficient is 0.
If object
is a table it is treated as a mixing matrix.
Two-dimensional table is interpreted as a contact layer. Three-dimensional
table is interpreted as a full mixing matrix m[ghy]
cross-classyfying all dyads, in which 'g' and 'h' correspond to group
membership of ego and alter respectively. Layers y=1 and y=2 are assumed to
be non-contact and contact layers respectively. In the 3-d case only
g[,,2]
is used.
If g
is an object of class "igraph" the measure is
calculated for the vertex attribute specified with vattr
.
For any other classes, object g
are coerced to a table and the
table method is called.
Numeric value of the index.
Newman, M. J. and Girvan, M. (2002) "Mixing patterns and community structure in networks", arXiv:cond-mat/0210146v1
Newman, M. J. (2003) "Mixing patterns in networks" arXiv:cond-mat/0209450v2
Mixing matrices: mixingm
Other segregation measures: coleman
,
ei
, freeman
,
gamix
, orwg
,
smi
, ssi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | assort(Wnet, "gender")
assort(EFnet, "type")
if( require(igraph, quietly = TRUE) ) {
# value of 'assort' for full networks of different sizes
f <- function(n)
{
gfull <- graph.full(n, directed=FALSE)
V(gfull)$type <- rep(1:2, length=vcount(gfull))
assort(gfull, "type")
}
set.seed(1)
x <- sort(sample(5:100, 25) * 2)
y <- sapply(x, f)
plot(x, y, type="o",
xlab="Network size", ylab="Assortativity coefficient",
main="Assortativity coef. for full networks of different sizes")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.