Returns a dataframe with all pairs of blocks at the desired level and the number of edges between them. Unconnected blocks are ommitted for space savings.

interblock_edge_counts(sbm, level = 1)

Arguments

sbm

sbm_network object as created by new_sbm_network.

level

Level of nodes who's blocks will have their block membership run through MCMC proposal-accept routine.

Value

Dataframe of block pairs (block_a and block_b) and the number of edges between them (count).

See also

Examples

# A small simulated network with random block assignment net <- sim_basic_block_network(n_blocks = 3, n_nodes_per_block = 10) %>% initialize_blocks(3) # Get counts of connections from each given block to the others net %>% interblock_edge_counts()
#> block_a block_b n_edges #> 1 bl_node_1 bl_node_0 54 #> 2 bl_node_2 bl_node_2 26 #> 3 bl_node_0 bl_node_0 21 #> 4 bl_node_1 bl_node_1 18 #> 5 bl_node_1 bl_node_2 44 #> 6 bl_node_0 bl_node_2 61