# randomsequence: create a random dominance sequence In EloRating: Animal Dominance Hierarchies by Elo Rating

## Description

create a random dominance sequence for testing or simulations

## Usage

 ```1 2``` ```randomsequence(nID=10, avgIA=20, startdate=as.Date("2000-01-01"), alphabet=T, reversals=0.1, ties=NULL, presence=NULL) ```

## Arguments

 `nID` number of IDs, must be less than 2601. `avgIA` average number of interactions and individual is involved in. `startdate` a start date `alphabet` should the individual within an interaction that comes first in alphabetical order be the winner? By default TRUE, which gives some orderliness in the hierarchy. `reversals` this proportion of interactions ends in reversed outcomes, i.e. the individual that comes first in the alphabet looses. Default = 0.1. `ties` this proportion of interactions ends undecided. `presence` vector of length 2. The first value indicates what proportion of individuals are absent for some time. The second value indicates the propotion of time (days) these individuals are absent.

## Value

an object of class `randomsequence`, which is a list with the following items:

 `seqdat` an interaction sequence `pres` a presence matrix, actually a `data.frame`

Christof Neumann

## Examples

 ```1 2 3 4 5 6 7 8 9``` ```IA <- randomsequence() SEQ <- elo.seq(winner=IA\$seqdat\$winner, loser=IA\$seqdat\$loser, Date=IA\$seqdat\$Date) stab.elo(SEQ) IA <- randomsequence(presence=c(0.5,0.5)) SEQ <- elo.seq(winner=IA\$seqdat\$winner, loser=IA\$seqdat\$loser, Date=IA\$seqdat\$Date, presence=IA\$pres) stab.elo(SEQ) ```

EloRating documentation built on May 29, 2017, 7:14 p.m.