Dyadic delay in sending

Packages: dplyr, ggplot2


The sending of the beeps to the participants is often done by an application and/or a server, which can be subject to issues. In the context of ESM dyad studies, it is often expected that the sending of the beeps to the two dyad members should be done at the same time or relatively close in time. It is something we can check.

A important requirement is to reformat your dataframe in a dyad format. In this manipulation, observations from the two dyad members are matched by their observation number and dyad number. A suffix is added to the variable names to differentiate the two dyad members’ observations. For instance, ‘sent_1’ for the sending time variable of partner 1 and ‘sent_2’ for partner 2.

Warning

Errors below can come from wrong data manipulation when creating the ‘data_dyad’ dataframe. Indeed, if the dyad members’ observations are not correctly matched or if observation numbers are not consistent between dyad members, the delay will be computed between two different observations. Hence, it’s advisable to review your code for any potential mistakes when merging the dyad members’ observations.

After reformating, we compute the absolute delay between the dyad’s observations for the same observation number and visualize its distribution. Common errors are extreme positive values, indicating extended time lags before the first (or second) partner received the beeps.

# Compute absolute delay in mins
data_dyad = data_dyad %>%
    mutate(dif_sent = abs(as.numeric(difftime(sent_2, sent_1, units="mins")))) 

# Visualize delay
data_dyad %>% 
    ggplot(aes(x = dif_sent)) +
        geom_histogram()

Above, we can see that most of the delays are rather small, with most of the beeps being received by dyad members within 1 minute of each other. However, few beeps were received by dyad members with significant delays (>10 minutes). We can further check those outliers by selecting the rows with a delay greater than 10 minutes:

data_dyad[data_dyad$dif_sent > 10, c("dyad","obsno", "sent_1", "sent_2", "dif_sent")]
     dyad obsno              sent_1              sent_2 dif_sent
50      1    50 2003-03-08 20:19:59 2003-03-08 20:07:40 12.31508
205     3    65 2003-03-11 20:39:13 2003-03-11 20:51:43 12.50000
228     4    18 2003-03-02 14:25:39 2003-03-02 14:38:42 13.06099
306     5    26 2003-03-04 08:52:06 2003-03-04 09:04:07 12.02243
381     6    31 2003-03-05 08:25:00 2003-03-05 08:13:39 11.35964
398     6    48 2003-03-08 14:08:49 2003-03-08 14:20:17 11.46667
498     8     8 2003-02-28 14:04:21 2003-02-28 14:16:41 12.31929
780    12    10 2003-02-28 20:31:03 2003-02-28 20:18:27 12.60000
890    13    50 2003-03-08 20:05:45 2003-03-08 20:17:55 12.16094
947    14    37 2003-03-06 11:20:39 2003-03-06 11:07:41 12.95830
1088   16    38 2003-03-06 14:47:15 2003-03-06 14:59:15 11.99452
1106   16    56 2003-03-10 08:42:25 2003-03-10 08:29:39 12.77561
1192   18     2 2003-02-27 11:49:08 2003-02-27 11:37:38 11.49333
1227   18    37 2003-03-06 11:36:39 2003-03-06 11:24:51 11.80364
1315   19    55 2003-03-09 20:36:41 2003-03-09 20:24:45 11.93333
1335   20     5 2003-02-27 20:36:27 2003-02-27 20:49:46 13.31517
1425   21    25 2003-03-03 20:14:07 2003-03-03 20:02:41 11.42791
1933   28    43 2003-03-07 14:13:38 2003-03-07 14:01:53 11.75518
1934   28    44 2003-03-07 17:10:13 2003-03-07 17:20:42 10.48768
2047   30    17 2003-03-02 11:07:12 2003-03-02 11:17:34 10.37118

Investigating the delay between the dyad members’ observations takes a similar approach to looking at the delay between two consecutive beeps. Therefore, we can incorporate methodologies (e.g., plots, covariates investigation) from the Delay two sent beeps topic to further explore the quantity of beeps sent aspect.