View source: R/stochastic_block_model.R
generate_graph.sbm_4group | R Documentation |
Draw a random graph from a stochastic blockmodel where the groups are determined by membership in the frame population (F) and membership in the hidden population (H). Membership in F is assumed to be independent of membership in H, and vice-versa.
## S3 method for class 'sbm_4group'
generate_graph(params)
sim.settings |
a list whose entries contain the parameter values which govern this random graph draw (see details) |
type |
either 'simple' or 'nested', depending on the type of inhomogenous
mixing; see |
The four groups, as determined by membership in F and H, are FH, FnotH, notF,notH, notFH.
The sim.settings
list should have entries
N the size of the entire population
p.F the prevalence of the frame population (N.F/N)
p.H the prevalence of the hidden population (N.H/N)
p.F.given.H the probability of being in F, given that a node is in H; if not specified, assume the probabilities are independent, so that p.F.given.H = p.F
zeta the probability of forming a tie for a pair of nodes in the same group
rho the relative probability of edge between two nodes that are not in the same group (for example, between a node in FnotH and FH). if rho is 0.8, then edges between FnotH and FH are 80 FnotH and FnotH (or FH and FH)
tau the true positive rate
The overall level of connectivity in the graph can be controlled by varying zeta. The extent to which members of the group are homogenously mixed can be controlled by varying rho. For example, when rho is 1, then all four groups are perfectly mixed with the entire population. When rho is less than 1, members of the same group tend to form ties with one another more than with others. And when rho is greater than 1, members of the same group tend to form ties with others more than with one another.
an igraph graph, drawn according to the settings passed in
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.