rpa_control_reciprocal: Control reciprocal edges. Defined for 'rpanet'.

View source: R/rpa_control.R

rpa_control_reciprocalR Documentation

Control reciprocal edges. Defined for rpanet.

Description

Control reciprocal edges. Defined for rpanet.

Usage

rpa_control_reciprocal(
  group.prob = NULL,
  recip.prob = NULL,
  selfloop.recip = FALSE
)

Arguments

group.prob

A vector of probability weights for sampling the group of new nodes. Defined for directed networks. Groups are from 1 to length(group.prob). Its length must equal to the number of rows of recip.prob.

recip.prob

A square matrix giving the probability of adding a reciprocal edge after a new edge is introduced. Defined for directed networks. Its element p_{ij} represents the probability of adding a reciprocal edge from node A, which belongs to group i, to node B, which belongs to group j, immediately after a directed edge from B to A is added.

selfloop.recip

Logical, whether reciprocal edge of self-loops are allowed.

Value

A list of class rpacontrol with components group.prob, recip.prob, and selfloop.recip with meanings as explained under 'Arguments'.

Examples

control <- rpa_control_reciprocal(
  group.prob = c(0.4, 0.6),
  recip.prob = matrix(runif(4), ncol = 2)
)

wdnet documentation built on May 29, 2024, 9:32 a.m.