Learn R Programming

nett (version 1.0.0)

sample_dcsbm: Sample from a DCSBM

Description

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

Usage

sample_dcsbm(z, B, theta = 1)

Value

An adjacency matrix following DCSBM

Arguments

z

Node labels (\(n * 1\))

B

Connectivity matrix (\(K * K\))

theta

Node connectivity propensity vector (\(n * 1\))

See Also

sample_dcpp, fast_sbm, sample_tdcsbm

Examples

Run this code
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)))

Run the code above in your browser using DataLab