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.

get_block_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 %>% get_block_edge_counts()
#> block_a block_b count #> 1 node-1_0 node-1_0 32 #> 2 node-1_0 node-1_1 24 #> 3 node-1_0 node-1_2 80 #> 4 node-1_1 node-1_1 5 #> 5 node-1_1 node-1_2 27 #> 6 node-1_2 node-1_2 33