sim.rand.graph.par
simulates N
simple random graphs with the
same clustering (optional) and degree sequence as the input. Essentially a
wrapper for sample_degseq
(or, if you want to match by
clustering, sim.rand.graph.clust
) and
set_brainGraph_attr
. It uses foreach
for
parallel processing.
sim.rand.graph.clust
simulates a random graph with a given degree
sequence and clustering coefficient. Increasing the max.iters
value will result in a closer match of clustering with the observed graph.
sim.rand.graph.par(g, N = 100, clustering = FALSE, ...)sim.rand.graph.clust(g, rewire.iters = 10000, cl = g$transitivity,
max.iters = 100)
An igraph
graph object
Integer; the number of random graphs to simulate (default: 100)
Logical; whether or not to control for clustering (default:
FALSE
)
Other parameters (passed to sim.rand.graph.clust
)
Integer; number of rewiring iterations for the initial graph randomization (default: 1e4)
The clustering measure (default: transitivity)
The maximum number of iterations to perform; choosing a lower number may result in clustering that is further away from the observed graph's (default: 100)
A list of N random graphs with some additional vertex and graph attributes
An igraph
graph object
If you do not want to match by clustering, then simple rewiring of the input
graph is performed (the number of rewire's equaling the larger of 1e4
and \(10 \times m\), where \(m\) is the graph's edge count).
Bansal S., Khandelwal S., Meyers L.A. (2009) Exploring biological network structure with clustered random networks. BMC Bioinformatics, 10:405-421.
rewire, sample_degseq,
keeping_degseq
rewire, transitivity,
keeping_degseq
Other Random graph functions: analysis_random_graphs
,
rich_club_norm
Other Random graph functions: analysis_random_graphs
,
rich_club_norm
# NOT RUN {
rand1 <- sim.rand.graph.par(g[[1]][[N]], N=1e3)
rand1.cl <- sim.rand.graph.par(g[[1]][[N]], N=1e2,
clustering=T, max.iters=1e3)
# }
Run the code above in your browser using DataLab