rpanet_general {wdnet}R Documentation

Internal functions for generating PA networks

Description

These functions generate a PA network with linear (rpanet_simple) or non-linear (rpanet_general) preference functions

Usage

rpanet_general(
  nstep,
  initial.network,
  control,
  m,
  sum_m,
  w,
  nnode,
  nedge,
  method,
  sample.recip
)

rpanet_simple(
  nstep,
  initial.network,
  control,
  m,
  sum_m,
  w,
  ex_node,
  ex_edge,
  method
)

Arguments

nstep

Number of steps when generating a network.

initial.network

A wdnet object or a list that represents the initial network. By default, initial.network has one directed edge from node 1 to node 2 with weight 1. It may have the following components: a two-column matrix edgelist representing the edges; a vector edgeweight representing the weight of edges; a logical argument directed indicating whether the initial network is directed; an integer vector nodegroup representing the group of nodes. nodegroup is defined for directed networks, if NULL, all nodes from the seed network are considered from group 1.

control

A list of parameters that controls the PA generation process. The default value is wdnet:::rpa_control_default(). By default, in each step, a new edge of weight 1 is added from a new node A to an existing node B (alpha scenario), where $B is chosen with probability proportional to its in-strength + 1.

m

Integer vector, number of new edges in each step.

sum_m

Integer, summation of m.

w

Vector, weight of new edges.

nnode

Integer, number of nodes in initial.network.

nedge

Integer, number of edges in initial.network.

method

Which method to use when generating PA networks: "binary" or "linear".

sample.recip

Whether reciprocal edges will be added.

Value

Returns a wdnet object that includes the following components:


[Package wdnet version 1.2.3 Index]