Iterating a bnr network
Usage
iterate_bnr(adjm, np, pb, pn, pr)
# S4 method for class 'matrix,numeric,numeric,numeric,numeric'
iterate_bnr(adjm, np, pb, pn, pr)
Arguments
- adjm
Adjacency matrix
- np
numeric vector setting ids for the newborn (i.e. which individual will be replaced with a new one) and a parent(s). Length 2 or 3. If you want to randomly select an id for the newborn (first value) and parents (second and third value), simply use c(0,0) or c(0,0,0). For one parent, the focal individual connects to this parent with probability pb. For two parent values, the individual connects to two parents each with probability pb.
- pb
Probability to connect to parent. Default is 1.
- pn
Probability to connect to neighbour of parent(s)
- pr
Probability to connect to individuals that are not connected to the parent