assort function

Assortativity

Assortativity

Calculates graph assortativity

assort(G, mode = "in.out")

Arguments

  • 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\overrightarrow{u_iv_i} define nodes and directionality of the ith arc, i=1,2,3,,mi=1,2,3,\ldots,m, let γ,τ,+\gamma,\tau\in{-,+} index the degree type: =in,+=out-=in, +=out, and let (uiγ,viτ)\left(u_i^\gamma,v_i^\tau\right), be the γ\gamma- and τ\tau-degree of the ith arc. Then, the general form of assortativity index is:

r(γ,τ)=m1i=1m(uiγuˉγ)(viτvˉτ)sγsτ r\left(\gamma,\tau\right)=m^{-1}\frac{\sum_{i= 1}^m (u_i^\gamma-\bar{u}^\gamma)(v^\tau_i-\bar{v}^\tau)}{s^\gamma s^\tau}

where uˉγ\bar{u}^\gamma and vˉγ\bar{v}^\gamma are the arithmetic means of the uiγu_i^\gammas and viτv_i^\taus, and sγs^\gamma and sτs^\tau are the population standard deviations of the uiγu_i^\gammas and viτv_i^\taus. Under this framework, there are four possible forms to r(γ,τ)r\left(\gamma,\tau\right) (Foster et al., 2010). These are: r(+,),r(,+),r(,)r\left(+,-\right), r\left(-,+\right), r\left(-,-\right), and r(+,+)r\left(+,+\right).

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)
  • Maintainer: Ken Aho
  • License: GPL (>= 2)
  • Last published: 2025-01-14

Useful links