traj.elo: calculate dominance trajectory

Description Usage Arguments Value Author(s) Examples

View source: R/traj.elo.r

Description

calculate individual Elo rating trajectory over time

Usage

1
2
traj.elo(eloobject, ID, from=min(eloobject$stability$date),
         to=max(eloobject$stability$date))

Arguments

eloobject

result from elo.seq

ID

the ID(s) of the individual(s)

from

from which date onwards should the trajectory be calculated. By default the first date in the sequence is used

to

until which date should the trajectory be calculated. By default the last date in the sequence is used

Value

A data.frame with as many lines as specified in ID, columns for ID, date range, the actual slope (trajectory), and the number of observed interactions within the date range

Author(s)

Christof Neumann

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(adv)
SEQ <- elo.seq(winner=adv$winner, loser=adv$loser, Date=adv$Date)
traj.elo(SEQ, "a")

traj.elo(SEQ, "a", from="2010-01-20", to="2010-01-30")

# no slope available if ID was not observed interacting 
# inside the date range
traj.elo(SEQ, "a", from="2010-01-17", to="2010-01-18")

# no slope available if ID was only observed interacting 
# once within the date range
traj.elo(SEQ, "a", from="2010-01-17", to="2010-01-19")

# for several individuals
traj.elo(SEQ, c("a", "b", "c"))

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