rnsbm: simulation of a graph according the noisy stochastic block...

Description Usage Arguments Value Examples

View source: R/dataGeneration.R

Description

simulation of a graph according the noisy stochastic block model

Usage

1
rnsbm(n, theta, modelFamily = "Gauss", directed = FALSE)

Arguments

n

number of nodes

theta

model parameters of the noisy stochastic block model

pi

latent block proportions, Q-vector

w

connectivity parameters, N_Q-vector

nu0

parameters of the null distribution

nu

parameters of the alternative distribution

modelFamily

probability distribution for the edges. Possible values: Gauss, Gamma, Poisson

directed

indicates if the graph is directed (boolean)

Value

a list with:

dataMatrix

simulated matrix from the noisy stochastic block model

theta

model parameters of the noisy stochastic block model

latentZ

underlying latent node memberships

latentAdj

underlying latent binary graph

Examples

1
2
3
4
5
6
7
n <- 10
Q <- 2
theta <- list(pi= rep(1/Q,Q), nu0=c(0,1))
theta$nu <- matrix(c(-2,10,-2, 1,1,1),nrow=Q*(Q+1)/2,ncol=2)
theta$w <- c(.5, .9, .3)
obs <- rnsbm(n, theta, modelFamily='Gauss')
obs

noisySBM documentation built on Dec. 16, 2020, 5:09 p.m.