R/helpers_network.R
sim_block_network.Rd
Draw a Simulation of Network Using Block Matrix of Probabilities of Edges Based on Group Memberships
sim_block_network(
N,
K,
prev_K,
rho_K,
p_edge_within,
p_edge_between,
directed = FALSE
)
number of units in population
number of groups
named numeric vector of prevalence for each group with last group being hidden
numeric vector of correlations in group memberships
named list of numeric vectors giving probability of link between in-group members and out-group members for each of groups. The order of objects in list have to follow the order of prev_K
named list of numeric values giving probability of link between in- and out-group member for each of groups. The order of objects in list have to follow the order of prev_K
logical, whether links are directed or undirected
igraph network object with vertex attribute type
in the binary coded format (consists of 0's and 1's only)