mlvsbm_simulate_generalized_network | R Documentation |
Create a simulate a generalized multilevel network (GenMLVSBM object)
mlvsbm_simulate_generalized_network(
n,
Q,
pi,
gamma,
alpha,
directed,
affiliation = "uniform",
distribution,
no_empty_org = FALSE,
no_isolated_node = FALSE
)
n |
A vector of L positive integers where L is the number of levels from the upper level to the lower level. |
Q |
A vector of L positive integers, the number of clusters for each level. |
pi |
A list of length L, with vectors of probabilities of length Q[l],
the mixture parameters. pi[[1]] must be a probability, pi[[l]] can be set to
|
gamma |
A list of size |
alpha |
A list of L matrices, of size |
directed |
A vector of L logical. Is level l a directed network ? |
affiliation |
The distribution under which the affiliation matrix is
simulated in c("uniform", "preferential", "diagonal").
"diagonal" is a special case where all affiliation matrix are diagonal
(individuals are the same on each levels, for temporal networks e.g.).
It requires |
distribution |
A list for the distribution of X, only "bernoulli" is implemented. |
no_empty_org |
A logical with FALSE as default, should
every nodes have at least one affiliated node on the level below?
Needs to have |
no_isolated_node |
A logical, if TRUE then the network is simulated again until all nodes are connected. |
An GenMLVSBM object, a simulated multilevel network with levels, affiliations and memberships.
my_genmlvsbm <- MLVSBM::mlvsbm_simulate_generalized_network(
n = c(10, 20), # Number of nodes for each level
Q = c(2, 2), # Number of blocks for each level
pi = list(c(.3, .7), NULL), # Block proportion for the upper level, must sum to one
gamma = list(matrix(c(.9, .2, # Block proportion for the lower level,
.1, .8), # each column must sum to one
nrow = 2, ncol = 2, byrow = TRUE)),
alpha = list(matrix(c(.8, .2,
.2, .1),
nrow = 2, ncol = 2, byrow = TRUE), # Connection matrix
matrix(c(.99, .3,
.3, .1),
nrow = 2, ncol = 2, byrow = TRUE)),# between blocks
directed = c(FALSE, FALSE),
distribution = rep("bernoulli", 2)) # Are the upper and lower level directed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.