randomsequence {EloRating} | R Documentation |
random dominance interaction sequence
Description
create a random dominance sequence for testing or simulations
Usage
randomsequence(
nID = 10,
avgIA = 20,
startdate = as.Date("2000-01-01"),
alphabet = TRUE,
reversals = 0.1,
ties = NULL,
presence = NULL
)
Arguments
nID |
integer, number of IDs, must be less than 2601 |
avgIA |
numeric, average number of interactions an individual is involved in |
startdate |
character, a start date, by default |
alphabet |
logical, should the individual within an interaction that comes first in alphabetical order be the winner? By default |
reversals |
numeric, proportion of interactions that ends in reversed outcomes, i.e. the initial winner (if |
ties |
numeric, proportion of interactions that ends undecided |
presence |
numeric vector of length 2. The first value indicates what proportion of individuals are absent for some time. The second value indicates the proportion 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 |
Author(s)
Christof Neumann
Examples
IA <- randomsequence()
SEQ <- elo.seq(winner = IA$seqdat$winner, loser = IA$seqdat$loser, Date = IA$seqdat$Date,
runcheck = FALSE, progressbar = FALSE)
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, runcheck = FALSE, progressbar = FALSE)
stab_elo(SEQ)