met.degree {ANTs} R Documentation

## Degree

### Description

Calculates the node metric degree for all vertices.

### Usage

met.degree(M, sym = TRUE, df = NULL, dfid = 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. sym if TRUE, then it symmetrizes the matrix, and computes the sums of the presencence/abscence of an edge between the focal node and it's alters without acounting for direction (i.e. it computes the number of alters). Otherwise, it computes the sum of the presencence/abscence of the indegrees and outdegrees between the focal node and it's alters. 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. dfid an integer or a string indicating the column with individual ids in argument df.

### Details

Node degree i is the sum of edges of i, it represents the number of alters.

### Value

• An integer vector of nodes degree if argument df is NULL.

• A list of integer vectors of nodes degree if argument M is a list of matrices and if argument df is NULL.

• A list of arguments df with a new column for nodes degree titled 'degree', if argument df is not NULL.

• A list of arguments df with a new column for nodes degree if 1) argument df is not NULL, 2) argument M is an output from ANT functions stat.ds.grp, stat.df.focal, stat.net.lk for multiple matrices permutations, and 3) argument df is a list of data frames of same length as argument M. The name of the column of each element of the list is adapted according to argument value binary.

### Author(s)

Sebastian Sosa, Ivan Puga-Gonzalez.

### References

Freeman, L. C. (1978). Centrality in social networks conceptual clarification. Social networks, 1(3), 215-239.

Barrat, A., Barthelemy, M., Pastor-Satorras, R., & Vespignani, A. (2004). The architecture of complex weighted networks. Proceedings of the National Academy of Sciences of the United States of America, 101(11), 3747-3752.

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

### Examples

met.degree(sim.m)