check_degdist_bal | R Documentation |
Checks for consistency in the implied network statistics of a two-group network in which the group size and group-specific degree distributions are specified.
check_degdist_bal(num.g1, num.g2, deg.dist.g1, deg.dist.g2)
num.g1 |
Number of nodes in group 1. |
num.g2 |
Number of nodes in group 2. |
deg.dist.g1 |
Vector with fractional degree distribution for group 1. |
deg.dist.g2 |
Vector with fractional degree distribution for group 2. |
This function outputs the number of nodes of degree 0 to g, where g is the length of a fractional degree distribution vector, given that vector and the size of the group. This utility is used to check for balance in implied degree given that fractional distribution within two-group network simulations, in which the degree-constrained counts must be equal across groups.
# An unbalanced distribution
check_degdist_bal(num.g1 = 500, num.g2 = 500,
deg.dist.g2 = c(0.40, 0.55, 0.03, 0.02),
deg.dist.g1 = c(0.48, 0.41, 0.08, 0.03))
# A balanced distribution
check_degdist_bal(num.g1 = 500, num.g2 = 500,
deg.dist.g1 = c(0.40, 0.55, 0.04, 0.01),
deg.dist.g2 = c(0.48, 0.41, 0.08, 0.03))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.