Negative duration

Hi all,

During the data cleaning process, I came across something remarkable: negative duration values. This only happened in three surveys (out of 126) of one single person. Could anyone think of a logical explanation for these odd observations?

These are the exact numbers (in R):

image

Best,
Teun

1 Like

Hi Teun,

For all these three cases, the survey was prompted before it was scheduled. You can see the data as stored in our database here:

                 uuid                 | activity_id |       scheduled_time       |        prompt_time         |        record_time
--------------------------------------+-------------+----------------------------+----------------------------+----------------------------
 670084fe-2639-48f6-af87-2612e3b922b6 |        4778 | 2019-12-09 06:52:07.802-05 | 2019-12-09 05:29:02.655-05 | 2019-12-09 05:36:43.837-05
 1e1ab01f-642a-42b9-a17d-2ac65570363e |        4779 | 2019-12-09 14:32:00.118-05 | 2019-12-09 05:29:04.004-05 | 2019-12-09 05:36:15.368-05
 513424b7-1ae8-4dad-af87-15a970cab7bc |        4774 | 2019-12-10 01:07:00.83-05  | 2019-12-09 05:29:05.601-05 | 2019-12-09 05:35:28.473-05

You can see even though the scheduled time was 6 am, 2 pm, and 1 am next day (EST), the prompt time was 5 am EST!! All these 3 cases happened in Android. The reason they were prompted earlier was that the alarm set for them went off earlier than expected. The alarm is managed by Android OS itself, and it’s very unusual for it to happen earlier (happened only 3 times in 48627 cases for study 936), all for the same person.

Regardless, we will make changes to Android to prevent this.

Thanks for reporting

1 Like

Thanks for your quick reply! Now it makes sense :smiley:

-Teun