Illustration of weighted network simulation

Share:

Description

Simulate a single weighted network

Usage

1
networkSimulation(n, k, theta)

Arguments

n

number of nodes in the network

k

number of nodes in the module, n < k

theta

module node score follow the uniform distribution in range [theta,1]

Value

a list containing network adjacency matrix, node score and module membership

Author(s)

Dong Li, dxl466@cs.bham.ac.uk

Examples

1
2
3
4
5
6
7
8
9
pp <- networkSimulation(100,20,0.5)
moduleid <- pp[[3]]
netid <- 1:100
restp<- netid[-moduleid]
groupdesign=list(moduleid,restp)
names(groupdesign)=c('module','background')
## Not run: library(qgraph)
pg<-qgraph(pp[[1]],groups=groupdesign,legend=TRUE)
## End(Not run)