Description Usage Arguments Value Examples

Create a simulated multilevel network (MLVSBM object)

1 2 3 4 5 6 7 8 9 10 11 12 | ```
mlvsbm_simulate_network(
n,
Q,
pi,
gamma,
alpha,
directed,
affiliation = "uniform",
distribution = list("bernoulli", "bernoulli"),
no_empty_org = FALSE,
no_isolated_node = FALSE
)
``` |

`n` |
A list of 2 positive integers, the number of individuals and organisations |

`Q` |
A list of 2 positive integers, the number of clusters of individuals and organisations |

`pi` |
A vector of probabilities of length Q_O, the mixture parameter for the organisations |

`gamma` |
A Q_IxQ_O matrix with each column suming to one, the mixture parameters for the individuals |

`alpha` |
A list of 2 matrices, a Q_IxQ_I matrix giving the connectivity probabilities of the individuals and a Q_OxQ_O matrix giving the connectivity probabilities of the organisations |

`directed` |
A list of 2 booleans. Is the individual level a directed network ? Is the organisational level a directed network ? |

`affiliation` |
The distribution under which the affiliation matrix is simulated in c("uniform", "preferential") |

`distribution` |
A list for the distribution of X, only "bernoulli" is implemented |

`no_empty_org` |
A boolean with FALSE as default, should every organisation have at least one affiliated individuals? Needs to have n_I >= n_O |

`no_isolated_node` |
A boolean, if TRUE then the network is resimulated until all nodes are connected |

An MLVSBM object, a simulated multilevel network with levels, affiliations and memberships

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
my_mlvsbm <- MLVSBM::mlvsbm_simulate_network(
n = list(I = 10, O = 20), # Number of nodes for the lower level and the upper level
Q = list(I = 2, O = 2), # Number of blocks for the lower level and the upper level
pi = c(.3, .7), # Block proportion for the upper level, must sum to one
gamma = 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(I = matrix(c(.8, .2,
.2, .1),
nrow = 2, ncol = 2, byrow = TRUE), # Connection matrix
O = matrix(c(.99, .3,
.3, .1),
nrow = 2, ncol = 2, byrow = TRUE)),# between blocks
directed = list(I = FALSE, O = FALSE)) # Are the upper and lower level directed
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.