sim.network: Simulating network data

View source: R/simNetwork.R

sim.networkR Documentation

Simulating network data

Description

Simulating network data

Usage

sim.network(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 TRUE if the returned matrices should be row-normalized and FALSE otherwise.

Value

list of (row-normalized) adjacency matrices.

See Also

sim.dnetwork

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         <- sim.network(dnetwork)

PartialNetwork documentation built on May 29, 2024, 10:08 a.m.