avg_degree_bnr | R Documentation |

Calculates the expected average degree of a BNR network (single parent only) based on the approximation by Ilany and Akcay, 2016 (see details).

avg_degree_bnr(n, pb, pn, pr) ## S4 method for signature 'numeric,numeric,numeric,numeric' avg_degree_bnr(n, pb, pn, pr)

`n` |
Number of nodes in the network |

`pb` |
Probability to connect to parent (default is 1) |

`pn` |
Probability to connect to neighbour of parent(s) |

`pr` |
Probability to connect to individuals that are not connected to |

The expected average degree *\bar{d}* is calculated as

* \bar{d} = \frac{(N-1)(p_b + (N-2)p_r)}{N-1-(N-2)(p_n - p_r)} *

Returns the expected average degree of a BNR network as a numeric value. This value is an analytic result and not a numeric approximation (compare examples below).

Ilany, A., and Akçay, E. (2016). Personality and Social Networks: A Generative Model Approach. Integrative and Comparative Biology, 56(6), 1197–1205. doi: 10.1093/icb/icw068

# Expected degree avg_degree_bnr(n = 100, pb = 1, pn = .2, pr = .02) # Compare to simulated network with identical parameters adjm <- make_bnr(n = 100, np = c(0,0), pb = 1, pn = .2, pr = .02) mean(adjm) * 100

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.