datagenfunc: Data generation

Description Usage Arguments Details Value Examples

View source: R/datagenfunc.R

Description

Generate dominance matrices following the description of Douglas et al 2017.

Usage

1
2
datagenfunc(gs, Nintm, mode = "lin", shrinkranks = TRUE,
  allowties = TRUE)

Arguments

gs

integer, group size

Nintm

integer, multiplier for interactions

mode

character, either "lin" for linear mode or "2", "3" or "4" for exponential modes

shrinkranks

logical, should generated ranks be 'shrunk' so that no gaps occur (default is TRUE), see details

allowties

logical, should tied/shared ranks be allowed in the data generation (default is TRUE)

Details

if shrinkranks = FALSE rank orders are returned that may have gaps, e.g. an allowed generated order might be 1, 1, 3, 3, 5, whereas 1, 1, 2, 2, 3 would not be allowed in this scenario (but it would be if shrinkranks = TRUE)

Value

a list, the first is the dominance matrix, the second are the true ranks (upon which simulation of outcomes of interactions is based)

Examples

1
2
3
4
5
6
set.seed(123)
datagenfunc(10, 2, shrinkranks = TRUE)[[2]]
# two IDs with rank=3 and one with rank=4
set.seed(123)
datagenfunc(10, 2, shrinkranks = FALSE)[[2]]
# two IDs with rank=3 and none with rank=4, but the next rank would be rank=5

gobbios/radagio documentation built on Dec. 26, 2019, 6:13 p.m.