## Sunday, May 13, 2012

### Other Statistical Measures

One of the major problems with all of the statistical measures I discussed a few posts back- all of the statistical analyses that the Dexcom software does with my numbers- is that they don't consider the following two hours to be different at all:

Hour A: 90, 100, 120, 128, 119, 104, 98, 92, 88, 84, 79, 81

Hour B: 79, 81, 84, 88, 90, 92, 98, 100, 104, 119, 120, 128

All of us who've had hours like these know that there's a huge difference. With hour A, you don't know what to do- your blood sugar zoomed up 38 points in 20 minutes, then it dropped 49 points in the next half hour or so. With hour B, your blood sugar just kept going in the same direction, a 49 point rise, and you are either injecting to correct it or keeping your finger on the insulin waiting to see if it rises further- you know what you're watching.

But as far as Dexcom is concerned, hours like these- days like these- are the same. Your blood sugar average is the same, your standard deviation is the same, your high and your low and interquartile range and all these supposed measures of glycemic variability- they're the same.

It's no use complaining about these things if you can't suggest something better. Fortunately, I can. I suggested it a few posts back. I suggested looking at the average of the absolute value of the first derivative of blood sugar. This basically measures how far apart any two adjacent sensor readings are likely to be. First derivative, by the way, just means slope. Using the absolute value just means that a rise is counted the same as a fall- otherwise the average first derivative would be very close to zero for anybody with decent blood sugar control, where by decent I mean good enough to stay out of DKA. I suggest as a unit of measure change in mg/dl per five minutes, although you can certainly use any other measures of blood sugar and time that you want.
This probably sounds kind of difficult to compute, but actually it's not bad. You can do it in two ways.

The hard way: look at each data point, compute the difference between each two, add it up, and divide by the number of time intervals. For hour A above, that would mean the differences are 10, 20, 8, 9, 15, 6, 6 , 4 ,4, 5, 2, the sum is 89, there are 11 five minute intervals, so the score is 8. `09`. For hour B above, that would mean the differences are 2, 3 4, 2, 2, 6, 2, 4, 15, 1, 8, the sum is 49, and dividing by 11 gives a score of 4.45. That is good; the hour with more variation had a higher score.

The easy way, something you can estimate with just a glance at your 24 hour screen, is to divide the screen into lines of up and down and just add up the differences between adjacent high points and low points. Looking at hour A, that'd mean breaking it into the rise of 90 to 128, the drop of 128 to 79, and the rise of 79 to 81; 38+ 49+2, which fortunately gives a sum of 89 again, to be divided by 11. Looking at hour B is even easier because it's all one line, from 79 to 128, which is a difference of 49, to be divided by 11.

Here is how you'd estimate it looking at a 24 hour screen (and this is much more doable with minimed which lets you scroll through data than it is with Dexcom which doesn't). Here is a 24 hour screen I took a picture of a while back:
We're going to do a very rough estimate- and it's going to be a low ball estimate- of my average absolute value of the first derivative. First, we break it up into trend lines. The first trend line looks like a drop from roughly 300 to roughly 80, the second line is fairly flat around 80, the third is a rise from 80 to roughly 280, the next is a drop from 280 to 150, the third is a rise from 150 to 180, the next is a drop from 180 to 50, the next is a rise from 50 to 210, the next is a drop from 210 to 70, and the last is a rise from 70 to 80. Adding the differences on these trends, I get 220+0+200+130+30+130+160+140+10 = 1020. The number of 5 minute intervals in a 24 hour period is 287, so I divide 1020/287 and get roughly 3.6. If I was using the software to break up the lines, I would get a higher number because there are are more drops and rises than I really accounted for, but 3.6 is a reasonable lowball estimate.

I believe that this measure is a much better indicator of how difficult your blood sugar is to deal with than just standard deviation.