RL {nemBM}R Documentation

Relocating Links algorithm (RL algorithm)

Description

It generates random network considering the selected types of triads.

Usage

RL(ideal.net, initial.net, triads = "forb", k = 100, custom.triads = NULL)

Arguments

ideal.net

Network with a desired blockmodel without inconsistencies; of class matrix.

initial.net

Initial network; of class matrix.

triads

What types of triads has to be considered (allowed allow, forbidden forb, all all or custom cust). Provide a list of triad types as used in package ergm.

k

Number of iterations.

custom.triads

A list with names of a subset of triads to be considered. The same names must be used as in ERGM package. Only if triads = "cust".

Value

A list contiainig: new.network which is the generated network (of class matrix); and CR which is a vector of CR values (calculated after each iteration).

Author(s)

Marjan Cugmas and Aleš Žiberna

References

Cugmas M, Ferligoj A, Žiberna A (2018) Generating global network structures by triad types. PLoS ONE 13(5): e0197514. https://doi.org/10.1371/journal.pone.0197514

Examples

# generate initial and ideal network
cohesiveBM <- rbind(c("com", "nul"), c("nul", "com"))
ideal <- genNetworkLE(BM = cohesiveBM, LE = 0, size = c(4, 4))
random <- genNetworkLE(BM = cohesiveBM, LE = 1, size = c(4, 4))
# generate network with the RL algorithm
generatedNetwork <- RL(ideal.net = ideal, initial.net = random, triads = "all", k = 10)

[Package nemBM version 1.00.01 Index]