dyadic_reversals {EloRating} | R Documentation |
changes in dyadic relationships
Description
compare dyadic relationships before and after a certain date
Usage
dyadic_reversals(eloobject, cutpoint = NULL, daterange = NULL)
Arguments
eloobject |
result from |
cutpoint |
character or Date, the date at which to split into pre and
post (default is |
daterange |
character or Date of length 2, the date range to be
considered (default is |
Value
a data.frame with one line per dyad:
- id1,id2
the dyad
- pre_n,post_n
the number of interactions for that dyad pre and post cutpoint date
- pre,post
which of the two was dominant (
1
= id1,2
= id2,0
= tied relationship,NA
= unknown relationship, i.e. 0 interactions)
Examples
data(adv)
eloobject <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date)
# split at halfway point ("2010-01-17")
# one reversal: a-f
dyadic_reversals(eloobject)
# shift split date so that both interactions for a/f occur in the post period,
# which makes it a tie in post and unknown in pre
dyadic_reversals(eloobject, cutpoint = "2010-01-10")
[Package EloRating version 0.46.18 Index]