G: Graph object of class igraph. See graph_from_literal.
mode: One of "in.in", "in.out", "out.out", "out.in", or "all".
Details
The definitive measure of graph assortativity is the Pearson correlation coefficient of the degree of pairs of adjacent nodes (Newman, 2002). Let uivi define nodes and directionality of the ith arc, i=1,2,3,…,m, let γ,τ∈−,+ index the degree type: −=in,+=out, and let (uiγ,viτ), be the γ− and τ−degree of the ith arc. Then, the general form of assortativity index is:
r(γ,τ)=m−1sγsτ∑i=1m(uiγ−uˉγ)(viτ−vˉτ)
where uˉγ and vˉγ are the arithmetic means of the uiγs and viτs, and sγ and sτ are the population standard deviations of the uiγs and viτs. Under this framework, there are four possible forms to r(γ,τ) (Foster et al., 2010). These are: r(+,−),r(−,+),r(−,−), and r(+,+).
Returns
Assortativity coefficeint outcome(s)
References
Newman, M. E. (2002). Assortative mixing in networks. Physical Review Letters, 89(20), 208701.
Foster, J. G., Foster, D. V., Grassberger, P., & Paczuski, M. (2010). Edge direction and the structure of networks. Proceedings of the National Academy of Sciences, 107(24), 10815-10820.
Author(s)
Ken Aho, Gabor Csardi wrote degree
Examples
network_a <- graph_from_literal(a --+ b, c --+ d, d --+ e, b --+ e, e --+ j,j --+ m, f --+ g, g --+ i, h --+ i, i --+ k, k --+ l, l --+ m, m --+ n,n --+ o)assort(network_a)