simnetwork {CDatanet} | R Documentation |
Simulating network data
Description
simnetwork
simulates adjacency matrices.
Usage
simnetwork(dnetwork, normalise = FALSE)
Arguments
dnetwork |
is a list of sub-network matrices, where the (i, j)-th position of the m-th matrix is the probability that i be connected to j, with i and j individuals from the m-th network. |
normalise |
boolean takes |
Value
list of (row-normalized) adjacency matrices.
Examples
# Generate a list of adjacency matrices
## sub-network size
N <- c(250, 370, 120)
## distribution
dnetwork <- lapply(N, function(x) matrix(runif(x^2), x))
## network
G <- simnetwork(dnetwork)
[Package CDatanet version 2.2.0 Index]