expected_edgecount.sbm_4group: compute the expected number of connections (degree) between...

View source: R/stochastic_block_model.R

expected_edgecount.sbm_4groupR Documentation

compute the expected number of connections (degree) between two groups under 4-block model

Description

for groups A and B, this returns d_{A,B} = d_{B,A}.

Usage

## S3 method for class 'sbm_4group'
expected_edgecount(params, first.group, second.group)

Arguments

params

a parameter vector, which must have pref.matrix and block.sizes

first.group

vector with the names of the block that blocks that are in group A

second.group

vector with the names of the blocks that are in group B

Details

it does not matter how the preference matrix and block sizes were generated, so this function could be used with many different models.

Value

The expected number of edges between the two groups under the stochastic block model given by pref.matrix. For example,


dfeehan/nrsimulatr documentation built on Feb. 27, 2024, 3:18 a.m.