met.assortativity {ANTs}R Documentation

Assortativity

Description

Calculates the binary or weighted version of vertices Newman's assortativity for categorical or continuous attributes.

Usage

met.assortativity(
  M,
  attr,
  se = FALSE,
  weighted = TRUE,
  df = NULL,
  perm.nl = TRUE,
  nperm = NULL
)

Arguments

M

a square adjacency matrix, or a list of square adjacency matrices, or an output of ANT functions stat.ds.grp, stat.df.focal, stat.net.lk.

attr

a factor vector of attributes for categorical assortativity. a numeric vector of attributes for continuous assortativity.

se

a boolean, if TRUE it computes the assortativity standard error.

weighted

a boolean, if TRUE it computes the weighted assortativity version of the network.

df

a data frame of same length as the input matrix or a list of data frames if argument M is a list of matrices or an output of ANT functions stat.ds.grp, stat.df.focal, stat.net.lk.

perm.nl

a boolean, if TRUE it permutes argument attr.

nperm

an integer indicating the number of permutations wanted.

Details

Assortativity allows the study of homophily (preferential interaction between nodes with similar attributes) and heterophily (the preferential interaction between nodes with different attributes). Attributes can be individual characteristics such as sex or age, or individual node metrics such as the met.degree.

Value

Author(s)

Sebastian Sosa, Ivan Puga-Gonzalez

References

Newman, M. E. (2003). Mixing patterns in networks. Physical Review E, 67(2), 026126.

Farine, D. R. (2014). Measuring phenotypic assortment in animal social networks: weighted associations are more robust than binary edges. Animal Behaviour, 89, 141-153.

Sosa, S. (2018). Social Network Analysis, in: Encyclopedia of Animal Cognition and Behavior. Springer.


[Package ANTs version 0.0.16 Index]