stochastic.block: stochastic.block

Description Usage Arguments Value Author(s) Examples

Description

Generate a realization of the stochastic block model with non-overlapping blocks

Usage

1
2
stochastic.block(n, k = 2, P, sizes, random.community.assignment = c(FALSE,
  TRUE), vector.output = c(FALSE, TRUE))

Arguments

n

Number of nodes

k

Number of blocks. Default is 2

P

k x k matrix where the (i,j)th entry specifies the probability of connection between community i and j

sizes

an array of length k where the ith entry specifies the size of the ith block. This must sum to n

random.community.assignment

logical specifying whether or not the labels are assigned randomly. If FALSE, labels are assigned in order starting with the upper left corner of the matrix. Default is FALSE

vector

logical specifying whether or not the returned adjacency matrix should be returned as a vector of edge variables. Default is FALSE

Value

a list containing the objects

Author(s)

James D. Wilson

Examples

1
2
net <- stochastic.block(n = 300, k = 2, P = cbind(c(0.1, 0.01), c(0.01, 0.1)), sizes = c(100, 200))
image(net$Adjacency)

rykim2/ESSCDocProj documentation built on May 23, 2019, 3:07 p.m.