How to best visualize or capture time interval between lab measurements?

I have a table like as shown below

subject_id   lab_test_id    lab_test_date       value    difference

"10005606"  "20364112"  "2143-12-06 02:32:00"   "1.3"   "13:10:00"
"10005606"  "20364112"  "2143-12-06 15:42:00"   "1.3"   "02:02:00"
"10005606"  "20364112"  "2143-12-06 17:44:00"   "1.3"   "10:11:00"
"10005606"  "20364112"  "2143-12-07 03:55:00"   "1.3"      NULL
"10005866"  "20364112"  "2149-10-01 19:30:00"   "2.1"   "07:42:00"
"10005866"  "20364112"  "2149-10-02 03:12:00"   "2.2"   "08:51:00"
"10005866"  "20364112"  "2149-10-02 12:03:00"   "2.1"   "04:59:00"
"10005866"  "20364112"  "2149-10-02 17:02:00"   "1.6"     NULL


the difference column indicates the time difference between each of the lab tests

Now, the doctor likes to know how often these measurements are done for each patient?

How can I best convey this information? Should I capture the average difference between lab tests?

For example, for patient = 10005606, it is 8 hours. Meaning adding all different values and divide by total number of records. 25 hours, 30 mins (approx)/3 records = 8 hours approx

Is there any other better way to represent this using median or any other measure etc?

Can guide me with this?

The average or median seem reasonable here. A boxplot might be a good choice of visualistion:

The y-axis could be your time dimension, and boxplot shows the normal distributions of differences, including the median value and outliers. You could then compare certain measurements against this. But it would of course depend on if you have enough data in your sample to represent the total population.

Or simply calculate the standard deviation of differences, and report this with your median (the mean value may be warped by outliers).

• Hi, thanks. upvoted. I have couple of questions based on your response Commented Mar 26, 2021 at 12:46
• q1) So, you are suggesting that I compute the average or median of difference variable for EACH PATIENT Commented Mar 26, 2021 at 12:48
• q2) I compute a similar average or median of difference for another lab measurement for each patient Commented Mar 26, 2021 at 12:49
• q3) Then compare the output of q1) and q2) as this can suggest which of the measurement has been frequent or how one measurement fares in comparison to the other ? Commented Mar 26, 2021 at 12:50
• The second difference changes your initial question, so you need a new question for Q3
– WBM
Commented Mar 26, 2021 at 12:57