Learn R Programming

nemBM (version 1.00.01)

nem: Generating networks according to the selected local network mechanisms

Description

It generates random network considering the selected local network mechanisms.

Usage

nem(X, formula, theta, k = 5000, q, b = 0.25)

Value

The list with the following elements:

  • initialNetwork - Initial network; of class matrix.

  • finalNetwork - Final (generated) network; of class matrix.

  • formula - The list of functions that define mechanisms used.

  • theta - A vector with the mechanisms' weights/strengths used.

  • k - The number of iterations.

  • q - The probability of establishing a link.

  • b - The share of alters among which an actor (i.e., ego) chooses to create or break a tie.

Arguments

X

Initial network; of class matrix.

formula

The list of local netork mechanisms to be considered.

theta

A vector with the mechanisms' weights/strengths.

k

The number of iterations.

q

The probability of establishing a link.

b

The share of alters among which an actor (i.e., ego) chooses to create or break a tie.

Author

Marjan Cugmas and Aleš Žiberna

References

Cugmas, M., Žiberna, A., & Ferligoj, A. (2019). Mechanisms generating asymmetric core-cohesive blockmodels. Advances in Methodology and Statistics, 16(1), 17-41.

Examples

Run this code
formula <- list(mutuality, popularity, assortativity)
X <- matrix(sample(c(0,1), size = 9**2, replace = TRUE), nrow = 9)
nem(X = X, formula = formula, theta = c(1, 1, 1), k = 100, q = 0.25)

Run the code above in your browser using DataLab