friendshipParadox: Friendship paradox metrics

View source: R/friendshipParadox.R

friendshipParadoxR Documentation

Friendship paradox metrics

Description

A function to calculate parameters related to the friendship paradox.

Usage

friendshipParadox(A)

Arguments

A

An adjacency matrix.

Details

This function calculates the following friendship paradox metrics: mean degree (kmean), mean degree of friends (kff), ratio between kff and kmean (ratio), variance of the degree distribution (variance) and difference between the mean degree of friends and the mean degree (difference).

Value

A list of

degree

the type of degree calculated: indegree (kin), outdegree (kout) and total degree (k).

kmean

the mean number of friends (degree).

kff

the mean number of friends of friends (degree of friends).

ratio

the ratio between kff and kmean.

variance

the variance of degree distribution.

difference

the difference between kff and kmean.

References

[1] Feld SL (1991). "Why Your Friends Have More Friends than You Do." American Journal of Sociology, 96, 1464-1477.

[2] Amaku M, Cipullo RI, Grisi-Filho JHH, Marques FS, Ossada R (2014). "The Friendship Paradox in Scale-Free Networks." Applied Mathematical Sciences, 8 (37), 1837-1845. doi: 10.12988/ams.2014.4288

[3] Amaku M, Grisi-Filho JHH, Negreiros RL, Dias RA, Ferreira F, Ferreira Neto JS, Cipullo RI, Marques FS, Ossada R (2015). "Infectious Disease Surveillance in Animal Movement Networks: An Approach Based on the Friendship Paradox." Preventive Veterinary Medicine, 121, 306-313. doi: 10.1016/j.prevetmed.2015.08.002

[4] Amaku M, Grisi-Filho JHH (2015). "The Friendship Paradox as a Strategy for Scenarios with Incomplete Network Data." Physics of Life Reviews, 15, 39-40. doi: 10.1016/j.plrev.2015.07.006

Examples

# Generate an arbitrary 10 by 10 adjacency matrix with zeros and ones
# Remove loops
A <- matrix(rbinom(10 * 10, 1, 0.2), ncol = 10, nrow = 10)
diag(A) <- 0

# Call function
friendshipParadox(A)
                                                   

leb-fmvz-usp/epinemo documentation built on Nov. 27, 2022, 10:58 p.m.