sample_dcsbm {nett}R Documentation

Sample from a DCSBM

Description

Sample an adjacency matrix from a degree-corrected block model (DCSBM)

Usage

sample_dcsbm(z, B, theta = 1)

Arguments

z

Node labels (n * 1)

B

Connectivity matrix (K * K)

theta

Node connectivity propensity vector (n * 1)

Value

An adjacency matrix following DCSBM

See Also

sample_dcpp, fast_sbm, sample_tdcsbm

Examples

B = pp_conn(n = 10^3, oir = 0.1, lambda = 7, pri = rep(1,3))$B
head(sample_dcsbm(sample(1:3, 10^3, replace = TRUE), B, theta = rexp(10^3)))

[Package nett version 1.0.0 Index]