nemBM {nemBM} | R Documentation |
Network evolution model with a prespecified blockmodel type and partition
Description
Generates an asymmetric network with a selected blockmodel type and partition. Considers local network mechanisms when creating links within blocks. Does not enable considering incomers and outgoers.
Usage
nemBM(X = X, partition, M, formula, theta, k = 10000, loops = FALSE)
Arguments
X |
Initial binary network; of class |
partition |
A desired partition in a vector format. Each unique value (positive integers) represents one cluster. |
M |
Desired image matrix with block densities. |
formula |
The list of local netork mechanisms to be considered. |
theta |
A vector with the mechanisms' weights/strengths. |
k |
The number of iterations. |
loops |
Wheter loops are allowed or not (default |
Value
The list with the following elements:
-
initialNetwork
- Initial network; of classmatrix
. -
finalNetwork
- Final (generated) network; of classmatrix
. -
formula
- The list of functions that define mechanisms used. -
theta
- A vector with the mechanisms' weights/strengths used. -
ERR
- Sum of squared differences between the desired and empirical densities across blocks; for each iteration. -
iterations
- The number of iterations. -
loops
- Wheter loops were allowed. -
M
- The desired (specified) image matrix. -
partition
- The partition. -
density
- Network density at each iteration. -
timeElapsed
- Running time.
Author(s)
Marjan Cugmas and Aleš Žiberna
References
Cugmas, M., & Žiberna, A. (2022). Approaches to blockmodeling dynamic networks: a Monte Carlo simulation study. Social Networks, in print.
Examples
formula <- list(mutuality, popularity, OTPtransitivity)
X <- matrix(sample(c(0,1), size = 9**2, replace = TRUE), nrow = 9)
diag(X) <- 0
M <- matrix(c(0.1, 0.8, 0.1, 0.5), nrow = 2)
partition <- c(1, 2, 2, 1, 1, 2, 2, 2, 1)
res <- nemBM(X = X, partition = partition, formula = formula,
theta = c(1, 1, 1), M = M, k = 100, loops = FALSE)