scoreList2scoreMat: scoreList2scoreMat : transform a list of Score matrices...

Description Usage Arguments Value Examples

View source: R/tools.R

Description

scoreList2scoreMat : transform a list of Score matrices (matrices of size nxn) into a matrix

Usage

1
scoreList2scoreMat(listScores, symmetric)

Arguments

listScores

: list of scores vector

symmetric

: TRUE is the network is not directed. FALSE otherwise

Value

one matrix with 'nbDyads' rows and d columns

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
nbNodes  <- 100
directed <- TRUE
blockProp <- c(1/3,1/2,1/6)
nbBlocks   <- length(blockProp)
connectParam <- matrix(rbeta(nbBlocks^2,1.5,1.5 ),nbBlocks,nbBlocks)
connectParam <- 0.5*(connectParam + t(connectParam))
emissionParam <- list()
nbScores <- 4
emissionParam$noEdgeParam <- list(mean=rep(0,nbScores));
emissionParam$noEdgeParam$var <- diag(0.1,nrow = nbScores,ncol = nbScores)
emissionParam$edgeParam <- list( mean= 1:nbScores)
emissionParam$edgeParam$var <-  diag(0.1,nrow = nbScores,ncol = nbScores)
dataSim <- rScoreSBM(nbNodes,directed = TRUE, blockProp,connectParam,emissionParam,seed = NULL)
S <- scoreList2scoreMat(dataSim$scoreNetworks , symmetric = FALSE)

Sophiedonnet/NoisySBM documentation built on Oct. 20, 2020, 12:04 p.m.