View source: R/user_function.R
mlvsbm_create_network | R Documentation |
Create a MLVSBM object from observed data
mlvsbm_create_network( X, A, directed = NULL, distribution = list("bernoulli", "bernoulli") )
X |
A list of 2 squares binary matrices, the first one being the individual or lower level the second one being the organizational or upper level |
A |
A matrix the affiliation matrix with individuals in rows and organizations in columns |
directed |
A list of 2 boolean are the upper and lower level directed or not. Default will check if the matrix are symmetric or not. |
distribution |
A list for the distribution of X, only "bernoulli" is implemented |
An unfitted MLVSBM object corresponding to the multilevel network
ind_adj <- matrix(stats::rbinom(n = 10**2, size = 1, prob = .2), nrow = 10, ncol = 10) org_adj <- matrix(stats::rbinom(n = 10**2, size = 1, prob = .3), nrow = 10, ncol = 10) affiliation <- diag(1, 10) my_mlvsbm <- mlvsbm_create_network(X = list(I = ind_adj, O = org_adj), directed = list(I = FALSE, O = FALSE), A = affiliation)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.