View source: R/randomsequence.R
randomsequence | R Documentation |
create a random dominance sequence for testing or simulations
randomsequence(
nID = 10,
avgIA = 20,
startdate = as.Date("2000-01-01"),
alphabet = TRUE,
reversals = 0.1,
ties = NULL,
presence = NULL
)
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 |
an object of class randomsequence
, which is a list with the following items:
seqdat |
an interaction sequence |
pres |
a presence matrix, actually a |
Christof Neumann
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.