gen_rand_conn: Generate randomly permuted connectivity matrix

View source: R/models.R

gen_rand_connR Documentation

Generate randomly permuted connectivity matrix

Description

Creates a randomly permuted DCPP connectivity matrix with a given average expected degree

Usage

gen_rand_conn(n, K, lambda, gamma = 0.3, pri = rep(1, K)/K, theta = rep(1, n))

Arguments

n

number of nodes

K

number of communities

lambda

expected average degree

gamma

a measure of out-in-ratio (convex combination parameter)

pri

the prior on community labels

theta

node connection propensity parameter of DCSBM, by default E(theta) = 1

Details

The connectivity matrix is a convex combination of a random symmetric permutation matrix and the matrix of all ones, with weights gamm and 1-gamma.

Value

connectivity matrix B of the desired DCSBM.


aaamini/nett documentation built on Nov. 12, 2022, 6:25 p.m.