Learn R Programming

noisySBM (version 0.1.4)

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

Description

simulation of a graph according the noisy stochastic block model

Usage

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

Run this code
# NOT RUN {
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
# }

Run the code above in your browser using DataLab