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
273     4    63 2003-03-11 14:53:46 2003-03-11 15:06:44 12.97765
286     5     6 2003-02-28 08:04:37 2003-02-28 08:17:34 12.95308
364     6    14 2003-03-01 17:09:27 2003-03-01 17:19:42 10.24764
519     8    29 2003-03-04 17:11:49 2003-03-04 17:23:42 11.87461
536     8    46 2003-03-08 08:05:12 2003-03-08 08:17:17 12.07272
601     9    41 2003-03-07 08:35:35 2003-03-07 08:22:34 13.01658
659    10    29 2003-03-04 17:20:04 2003-03-04 17:31:56 11.86541
708    11     8 2003-02-28 14:29:05 2003-02-28 14:41:36 12.51667
851    13    11 2003-03-01 08:59:19 2003-03-01 08:47:29 11.83410
1424   21    24 2003-03-03 17:12:59 2003-03-03 17:25:35 12.60460
1471   22     1 2003-02-27 08:17:03 2003-02-27 08:05:15 11.79526
1554   23    14 2003-03-01 17:13:43 2003-03-01 17:01:11 12.53263
1586   23    46 2003-03-08 08:11:22 2003-03-08 08:24:24 13.03589
1795   26    45 2003-03-07 20:16:51 2003-03-07 20:04:06 12.73971
1806   26    56 2003-03-10 08:07:25 2003-03-10 08:20:30 13.08333
1873   27    53 2003-03-09 14:43:55 2003-03-09 14:55:23 11.46730
1904   28    14 2003-03-01 17:45:53 2003-03-01 17:34:51 11.03400
1911   28    21 2003-03-03 08:25:23 2003-03-03 08:35:58 10.58333
1969   29     9 2003-02-28 17:22:14 2003-02-28 17:12:06 10.13951
2036   30     6 2003-02-28 08:18:26 2003-02-28 08:08:15 10.18294

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.