dyadic_reversals: changes in dyadic relationships

Description Usage Arguments Value Examples

View source: R/dyadic_reversals.R

Description

compare dyadic relationships before and after a certain date

Usage

1
dyadic_reversals(eloobject, cutpoint = NULL, daterange = NULL)

Arguments

eloobject

result from elo.seq

cutpoint

character or Date, the date at which to split into pre and post (default is NULL, where the data is split in halves). The actual date here will be included in the 'pre' period.

daterange

character or Date of length 2, the date range to be considered (default is NULL where the entire date range in the data is used)

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

1
2
3
4
5
6
7
8
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")

EloRating documentation built on March 26, 2020, 7:29 p.m.