domgen: generate random data for bond package

View source: R/domgen.R

domgenR Documentation

generate random data for bond package

Description

generate random data for bond package

Usage

domgen(
  bondsdata = NULL,
  no = 100,
  ago = c("suppl", "thrt", "fight"),
  agow = c(0.6, 0.3, 0.1),
  drawprop = 0.1,
  reversals = 0.1
)

Arguments

bondsdata

output from datagen

no

number of interactions to be created

ago

character, determines behaviours for the "agonistic" interactions of domgen

agow

numeric, weights of occurences of behaviours in domgen

drawprop

proportion of interactions that end undecided

reversals

proportion of interactions that end against the implicit rule regarding which individual wins. By default this is alphabetic, i.e. of two individuals interacting, the winner precedes the loser in alphabetic order

Details

domgen() does not yet work by itself, i.e. it relies on specifying bondsdata being the output from datagen.

Value

a data.frame with winner/loser interactions

Examples

x <- datagen(no=20, ni=3)
# observation time table
x$ot
# interactions
x$dataseq

# and for dominance interactions
y <- domgen(x)

gobbios/socialindices documentation built on Feb. 14, 2023, 3:56 p.m.