View source: R/rem_dyadiccutoffhelp.R
computeRemDyadCut | R Documentation |
A user-helper function to assist researchers in finding the dyadic cutoff value to compute sufficient statistics for relational event models based upon temporal dependency.
computeRemDyadCut(halflife, relationalWidth, Lerneretal_2013 = FALSE)
halflife |
The user specified halflife value for the weighting function. |
relationalWidth |
The numerical value that corresponds to the time range for which the user specifies for temporal relevancy. |
Lerneretal_2013 |
TRUE/FALSE. TRUE indicates that the Lerner et al. (2013) exponential weighting function will be used (see the details section). FALSE indicates that the Lerner and Lomi (2020) exponential weighting function will be used (see the details section). Set to FALSE by default |
This function is specifically designed as a user-helper function to assist
researchers in finding the dyadic cutoff value for creating sufficient statistics
based upon temporal dependency. In other words, this function estimates a dyadic
cutoff value for relational relevance, that is, the minimum dyadic weight for past
events to be potentially relevant (i.e., to possibly have an impact) on the current
event. All non-relevant events (i.e., events too distant in the past from the
current event to be considered relevant, that is, those below the cutoff value)
will have a weight of 0. This cutoff value is based upon two user-specified
values: the events' halflife (i..e, halflife
) and the relationally relevant event
or time span (i.e., relationalWidth
). Ideally, both the values for halflife
and
relationalWidth
would be based on the researcher’s command of the relevant
substantive literature. Importantly, halflife
and relationalWidth
must be in
the same units of measurement (e.g., days). If not, the function will not return
the correct answer.
For example, let’s say that the user defines the halflife
to be 15
days (i.e., two weeks) and the relationally relevant event or time
span (i.e., relationalWidth
) to be 30 days (i.e., events that occurred
more than 1 month in the past are not considered relationally relevant
for the current event). The user would then specify halflife
= 15 and relationalWidth
= 30.
Following Lerner and Lomi (2020), the exponential weighting function in relational event models is:
w(s, r, t) = e^{-(t-t') \cdot \frac{ln(2)}{T_{1/2}} }
Following Lerner et al. (2013), the exponential weighting function in relational event models is:
w(s, r, t) = e^{-(t-t') \cdot \frac{ln(2)}{T_{1/2}} } \cdot \frac{ln(2)}{T_{1/2}}
In both of the above equations, s is the current event sender, r is the
current event receiver (target), t is the current event time, t' is the
past event times that meet the weight subset, and T_{1/2}
is the halflife parameter.
The task of this function is to find the weight, w(s, r, t)
, that corresponds to the
time difference provided by the user.
The dyadic weight cutoff based on user specified values.
Kevin A. Carson kacarson@arizona.edu, Diego F. Leal dflc@arizona.edu
Lerner, Jürgen and Alessandro Lomi. 2020. “Reliability of relational event model estimates under sampling: How to fit a relational event model to 360 million dyadic events.” Network Science 8(1): 97-135.
Lerner, Jürgen, Margit Bussman, Tom A.B. Snijders, and Ulrik Brandes. 2013. " Modeling Frequency and Type of Interaction in Event Networks." The Corvinus Journal of Sociology and Social Policy 4(1): 3-32.
#To replicate the example in the details section:
# with the Lerner et al. 2013 weighting function
computeRemDyadCut(halflife = 15,
relationalWidth = 30,
Lerneretal_2013 = TRUE)
# without the Lerner et al. 2013 weighting function
computeRemDyadCut(halflife = 15,
relationalWidth = 30,
Lerneretal_2013 = FALSE)
# A result to test the function (should come out to 0.50)
computeRemDyadCut(halflife = 30,
relationalWidth = 30,
Lerneretal_2013 = FALSE)
# Replicating Lerner and Lomi (2020):
#"We set T1/2 to 30 days so that an event counts as (close to) one in the very next instant of time,
#it counts as 1/2 one month later, it counts as 1/4 two months after the event, and so on. To reduce
#the memory consumption needed to store the network of past events, we set a dyadic weight to
#zero if its value drops below 0.01. If a single event occurred in some dyad this would happen after
#6.64×T1/2, that is after more than half a year." (Lerner and Lomi 2020: 104).
# Based upon Lerner and Lomi (2020: 104), the result should be around 0.01. Since the
# time values in Lerner and Lomi (2020) are in milliseconds, we have to change
# all measurements into milliseconds
computeRemDyadCut(halflife = (30*24*60*60*1000), #30 days in milliseconds
relationalWidth = (6.64*30*24*60*60*1000), #Based upon the paper
#using the Lerner and Lomi (2020) weighting function
Lerneretal_2013 = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.