met.affinity.single: Affinity

View source: R/met.affinity.single.R

met.affinity.singleR Documentation

Affinity

Description

Calculate for all the vertices the node metric call Affinity

Usage

met.affinity.single(M, df = NULL, dfid = NULL, binary = FALSE)

Arguments

M

a square adjacency matrix.

df

a data frame of same length of the input matrix.

binary

a boolean, if true, it calculates the binary version of the affinity.

Details

Affinity is a second order metric that try to evaluate to which egos, node in is connected. The binary version is simply the average degree of alters of node i. The weighted version is ratio between the met.reach metric and the met.strength of node i.A high met.affinity reveals that nodes tend to be connected to alters of high degrees or strengths. Thus, both metrics provide information on node assortativity by vertex met.degree, i.e. connections between nodes with similar degrees or strengths.

Value

Integer vector of each vertices met.affinity.

Author(s)

Sebastian Sosa, Ivan Puga-Gonzalez.

References

Whitehead, H. A. L. (1997). Analysing animal social structure. Animal behaviour, 53(5), 1053-1067.

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


SebastianSosa/ANTs documentation built on Sept. 25, 2023, 11:06 p.m.