mv_sbm_gen: Generates data from a stochastic block model for multiple...

Description Usage Arguments Value References Examples

View source: R/mv_sbm_gen.R

Description

Generates data from a stochastic block model for multiple network data views with n observations and two views.

Usage

1
mv_sbm_gen(n, Pi, theta1, theta2, sparse = FALSE)

Arguments

n

number of observations

Pi

K1 x K2 matrix where the (k, k')th entry contains the probability of an observation belonging to community k in View 1 and community k' in View 2

theta1

K1 x K1 matrix containing the between-community edge probabilities for View 1

theta2

K2 x K2 matrix containing the between-community edge probabilities for View 2

sparse

If true, return data views in sparseMatrix format

Value

A list containing the following components:

data

A list with two items: the n x n view 1 adjacency matrix and the n x n view 2 adjacency matrix

communities

A list with two items: the view 1 community memberships and the view 2 community memberships

References

Gao, L.L., Witten, D., Bien, J. Testing for Association in Multi-View Network Data, preprint.

Examples

1
2
3
4
5
6
7
8
# 50 draws from a stochastic block model for two network data views 
# where the communities are dependent
n <- 50
Pi <- diag(c(0.5, 0.5))
theta1 <- rbind(c(0.5, 0.1), c(0.1, 0.5))
theta2 <- cbind(c(0.1, 0.5), c(0.5, 0.1))

mv_sbm_gen(n, Pi, theta1, theta2)

multiviewtest documentation built on Oct. 13, 2021, 5:08 p.m.