Sunday, September 9, 2018

Interesting Analysis of the Libre Temperature Dependence

A Facebook friend kindly sent me the following link with an interesting analysis of the Libre temperature dependence by Uwe Petersen. It is definitely a must read if you are interested in the impact of temperature on the glucose values delivered by the Libre.

I had the pleasure to chat a bit with Uwe about those issues a couple of years ago or so and came out impressed by his honesty and methodic approach.

Thursday, March 22, 2018

What has Dr Faustman been up to so far?

Now and then, I review the literature and check if some progress has been made towards a T1D cure or, less ambitiously, towards the understanding of T1D pathogenesis. (spoiler: not much). While I try stay away from controversial topics, in the “cure” field, Dr DL Faustman is hard to avoid.

The Faustman saga for dummies.

A long, long time ago, Dr Faustman revisited the even older topic of the BCG/Diabetes relationship. While she did find some interesting stuff, she over extended herself with claims that proved to be wrong. The erroneous claims (nothing wrong with being wrong, this is how science works) and partial replication of her results by another team (same remark) led to a conflictual situation that created difficulties for her to get funding but also contributed to the emergence of a fan base that supported her. That fan base consists of a mix of conspiracy theorists who think she has a cure but that it is being suppressed and very rational and generous people who support her as they would support any other group working towards the “cure” moonshot. On the other hand, Dr Faustman’s communication style, her bold claims, especially in the fundraising effort directed towards her base, has irritated a lot of people. She’s a White Knight to some, a Dark Lord to others.
Link: the “permanent disease reversal” paper that started the controversy: in a nutshell, the splenocyte role could not be replicated.

Restarting the saga.

In 2012, a publication titled Proof-of-concept, randomized, controlled clinical trial of Bacillus-Calmette-Guerin for treatment of long-term type 1 diabetes restarted the fireworks. Without diving into the details of what this paper shows or doesn’t show, something that would be out of my league as far as the finer points are concerned anyway, one can risk a few comments.
  • the title of the article is extremely bold: treatment of long-term type 1 diabetes would be a major breakthrough, worthy of a Nobel prize.
  • the use of BCG, basically a common vaccine, opens the door to catchy headlines such as “could a simple vaccine cure type 1 diabetes?”
  • the number of patients involved in the clinical trial (n=85, but only n=6 actual) can be seen as insufficient. Additionally, the 6 patients were initially split in 2 groups of 3 (control/intervention), but were then reshuffled as a 3-1+1 as an EBV infection occurred. Obtaining statistically significant results, at least at the patient level, is just black magic. Yes, formulas will provide an answer, they always do but…
  • the methods are extremely well documented and the trial seems to have been conducted according to the highest standard (double checked with actual researchers who stated “if all papers were like this, that would be good”).

Typical reactions to the paper.

The non scientifically educated patient will start looking for places where he can purchase the BCG vaccine and expect a full recovery whereas the physicist will trash the paper as bogus research and a shameful misapplication of statistics to massage the data into the desired results. Bottom line: there we go again! White Knight or Dark Lord?
That being said, if one looks beyond the catchy, almost dishonest, title, if one ignores the patient outcome and statistical massaging, one could focus on the flow cytometry results (essentially counting cells) and see an interesting effect. Had the paper been titled something like “BCG vaccination increases apoptosis in Insulin reactive T cells”, I believe it wouldn’t have generated as many negative reactions or false hopes.

So what’s going on here?

The BCG vaccine is used as a TNF proxy. TNF (Tumor Necrosis Factor) has been shown to play a role in the evolution of Type 1 Diabetes, a “paradoxical role” as researchers say since it has been shown to be both protective and harmful. The problem is that you can’t just go around and inject Type 1 Diabetics with TNF: TNF is usually bad for you, one is unlikely to obtain approval for a clinical trial involving TNF injections. (anti-TNF of all kinds have revolutionized the treatment of many auto-immune arthritis). Therefore, BCG – a known to be safe vaccine and known  TNF trigger as most mycobacterium are – is used as a relatively mild shot at the insulin reactive T cells which are known to play a role in the T1D auto-immune reaction.

One additional interesting point is that there are, at least, two different TNF Receptors that are unequally distributed in different cell populations and that trigger different responses. TNFR2 is the receptor Dr Kaufman is interested in, as it is shown in this 2016 paper Treg activation defect in type 1 diabetes: correction with TNFR2 agonism.
A small explainer may be needed here:
  • cytotoxic T cells are involved in the auto-immune reaction that kills healthy cells (for example insulin reactive T cells).
  • regulatory T cells (rTregs) when activated (aTregs) may prevent or stop auto-immune diseases by keeping cytotoxic T cells in check (preventing them from activating or triggering their death).
  • Type 1 Diabetics seem to have a defect in Treg activation (they end up with less aTregs).
  • that defect seems to be significant because the number of aTregs seems to be inversely correlated with residual C-Peptide secretion and control.
  • TNFR2 agonism (that means stimulating the TNFR2 receptor instead of blocking it as an antagonist would) leads to more aTregs which could be good.
Once again, the title of the paper is a bit ambiguous, the aTregs “defect” mechanism of action isn’t that clear and its clinical impact is only inferred through association and correlation. The snapshot fits in the current movie of our immune system understanding but isn’t definitely proven to be the root cause of all ills.

Dr Faustman could indeed very well be on an interesting track, as she recently stated in this opinion piece TNF, TNF inducers, and TNFR2 agonists: A new path to type 1 diabetes treatment but one can’t help being a bit annoyed by the boldness of her claims compared the current level of evidence.

Some of her detractors could joke: “What next? Will she also treat cancer?”

Ugh, well, yeah, she could…  TNFR2: A Novel Target for Cancer Immunotherapy.

My own (worthless) opinion

Interesting research, despite the hype. This is an area that is definitely worth exploring and it is actively explored by many researchers in many different fields. A cure? Not within 5 years. Small steps in the correct direction? most probable.

Wednesday, March 21, 2018

Perception bias in T1D communities: late onset type 1 diabetes

T1D communities are often very vocal when it comes to the issue of initial Type 1 Diabetes. This is especially true when a case of late diagnosis leading to a fatal or debilitating DKA goes viral. At that point, prayers and thoughts (which are as effective in preventing diabetes or treating DKA as they are in school shootings and gun control) fly and the T1D community erupts in “know the signs” memes and aggressive comments about medical professional who, at best, are accused of not doing what they should be doing, namely finger pricking every case of stomach flu they encounter. That measure that would be expensive, hard to interpret, lead to a lot of even more expensive confirmation tests. While they would probably yield a few earlier diagnosis, even fewer early stage DKA detections, the benefits – in the current state of therapies – would be nil in terms of long term prognosis and minimal in terms of DKA complications (ease of access to quality health care matters much more in terms of initial DKA prognosis, initial DKA isn’t a major factor in morbidity/mortality).

One of the latest circulating memes, recycling the “know the signs” memes, is that you can catch T1D at any age (true, although the onset is definitely skewed towards the young) and that T1D is often misdiagnosed as T2D. That’s understandable given the fact that T1D communities will have their fair share of members who have been diagnosed T1D after a misdiagnosis of T2D.

However, the T1D communities perception of “misdiagnosed” T1D is the result of multiple biases.

- Adult T2Ds far outnumber T1Ds.
- T2Ds who were initially misdiagnosed as T1Ds are unlikely to hang around in T1D communities.
- T1Ds who were initially misdiagnosed as T2Ds are likely to join T1D communities and likely to be unhappy and vocal about their misdiagnosis.

What’s the reality?

In fact, the issue is well known and well recognized

Late-onset type 1 diabetes is difficult to diagnose in people aged 31–60 years because it represents only a small minority of patients diagnosed with diabetes; its misdiagnosis as type 2 diabetes results in inappropriate treatment. (quote from the paper below)

However, given the huge discrepancy in the size of the respective populations, what actually happens in terms of diagnosis mistakes is the exact opposite of what the T1D communities are worried about.

Errors are often made when diagnosing type 1 diabetes later in life. For example, more than 50% of patients diagnosed with type 1 diabetes after age 35 years were shown to have type 2 diabetes in long-term follow-up. (quote from the paper below)

That issue is, for example, addressed in “Frequency and phenotype of type 1 diabetes in the first six decades of life: a cross-sectional, genetically stratified survival analysis from UK Biobank” (free full text).

One of the sensible ways to improve diagnosis accuracy as far as adult onset T1D and T2D is to take genetic predisposition factors into account.

Sunday, March 4, 2018

Another quick example of the main Libre problem: thermal compensation.

Apologies for not keeping up with the blog, real life has been interfering...

That being said, here is another example of the main drawback of the Libre: thermal compensation is really poor.

Have a look at the chart below and try to guess what it shows...

I am wearing the patch. I am a non diabetic person (neither Type 1, nor Type 2).

12:00: small meal

13:00: exercise (stationary bike starts)

14:00: bottle of sports drink as I start feeling the lack of supplies.

15:00: exercise stops, feeling really drained. My Garmin Fenix says I'll need 67 hours of recovery. My average heart rate was 142, with several spikes to my maximum FC. So far, so good, 61 might be a bit on the lowish side, but nothing incoherent.

15: 30: I do not eat or drink anything and decide to relax in a warm bath for a while...

My BG starts to climb steadily, first spot check is at 105 mg/dL, second spot check is at 157 mg/dL, around 250% of my actual value. As soon as I get out of my bath, my BG starts to drop precipitously (the reader refuses to provide values at that point) and then resumes cruising at the pre-bath value.

What if I had had to take an insulin dosing decision during that time? What if I had an AP running?

Abbott needs to fix this in the future. Fancy apps, not so much. Decent temperature compensation, yes, definitely.

On the "plus" side, at least for Abbott, the combined effect of the sub-optimal (cough, cough) temperature compensation and the delay compensation - the actual smoothed value never reached the projected high - is so bad that I stopped being motivated in reversing it long ago...

Tuesday, November 21, 2017

Trying to navigate the MDI and adolescence maze (and failing…)

Since Max does not want to use a pump, we are on Multiple Daily Injections. On the quick acting insulin side, we have always been using Novorapid pens. We are fairly happy with Novo, assuming it is pre-injected to match the carb absorption curve as much as possible. On the slow acting side, we switched from Lantus to Levemir because we couldn’t avoid a systematic low trend when Lantus picked up. Then, for a few months, Max expressed the desire to switch back to Lantus (I have absolutely no idea why he wanted to do that, but since it is HIS diabetes, he gets to choose…). After a few months, we switched back to Levemir, as the “pickup lows” resurfaced. Those aren’t completely avoided with Levemir, but they are less severe.
As far as the schema and doses are concerned, we have two peculiarities:
  • we use a single evening dose of Levemir in the evening (around 10 units) in contrast with the standard two doses 12 hours apart schema.
  • we tend to have low total insulin requirements, in the 0.25 to 0.50 U per day/kg. At times, after sports, Max can actually skip fast acting doses and have a meal. We did get a few periods (months) where a very low (<0.25U/ TDD was used. Max had an ACTH stimulation test to exclude Addison’s disease which turned out to be normal (along with insulin dosing).
As far as dosing is concerned, Max typically guesstimates his doses (teens…) without severe consequences: only one trip to the hospital for a post-sport hypo that scared the school (a slight over-reaction, but better safe than sorry), zero glucagon injection required, and 4 and 1/2 year of sub 6 HbA1c.

I you are beginning to think we have an easy ride, you are wrong…

“What hath night to do with sleep?”

(John Milton, Paradise Lost)

The biggest problem we have is that there is a huge chasm between the basal insulin theory and the practice, at least in teens. Regardless of the care we put into the injections, variability is kind. Our site rotation plan is quite decent. So is Max’s injection technique. Storage is what it should be. Doses are adapted depending on the exercise of the day. Trends are corrected the next day, etc…

Still, too often, the results seem to be a lottery.

One of the questions on my mind was to double check if we could correlate poor outcomes with injection sites. (Well, to be honest, there are many questions on my mind but I will focus on that one in this post).

Site rotation

We use the standard “front of leg” site for basal insulin. We usually plan a site sequence for the week. Unless a mistake is made, we do not use sites two days in a row and, in the worst case scenario, sites are re-used after a week. Now and then, we reset the sites rotation we use. I am aware that some app can help, but in most cases, apps are a burden and we tend to stay away from them. Max two legs are divided in three height zones (upper, middle, lower) and three sides (internal, middle and external) giving us a total of 18 injection sites to rotate through.

Outcome classification and scoring

Outcome are defined – subjectively – by examination of CGM traces as follows.

STB is a stable night, regardless of the level (we of course would correct stable low or stable high levels). This is the usual archetype of a “good basal rate”
TL and TH are nights with mild trends that you would typically associate with a slightly excessive or insufficient basal rate.

ER, MR, LR are the rises. Early in the night (before 24:00), in the middle of the night (between 00:00 and 3:00) or late in the night (between 3:00 and 6:30). These rises are characterized by a sudden relatively quick increase, steeper than trends but not as steep as meals, they are typically at the rate of roughly 30 mg/dL.hour. Obviously, as soon as the increase is confirmed (example, starts at 90 mg/dL is at 150 mg/dL after two hours) corrective measures are taken. (for example: a 30 mg/dL trend would be corrected by x units to bring the 150 mg/dL back to around 100 mg/dL plus x units to compensate the trend for the next 3 hours). That basic algorithm has never failed us on the low side (no hypo caused) but is sometimes insufficient and is typically reassessed  after 2.5 to 3 hours. Late rises are a pain, especially if they are combined with a dawn phenomenon. As a caregiver, you either have to go to sleep extremely late or wake up extremely early. Setting up CGM alarms is a no go. They aren’t flexible enough to help. 150 md/dL at 6 AM is OK, we aren’t going to be able to correct it anyway, but it would be nice to have one at 1AM in the same conditions and rising.

HYP are the severe low trends which require multiple and frequent corrections. They typically rear their ugly heads after intense sport sessions. We do of course correct those actively. While we do reduce basal in obvious situations and adapt the evening meals after such sport sessions, we never totally got rid of it.

That classification is therefore somewhat subjective and can’t be directly derived by nightly averages.

DAWN the dawn phenomenon is treated separately. It shows up in random clusters. The dawn phenomenon’s classification is again somewhat subjective. That being said, it is quite obvious when it shows up, kicking a LR into high gear above 300 mg/dL, pushing a TL situation into a TH one, etc…

Scoring is even more arbitrary (even though it is normalized for more sophisticated analysis). STB is worth 10 points, that is the ideal situation. Trends are given 6 points, they are extremely easy to assess. Early Rises are not that bad, easy to correct at a decent hour, they are worth 5 points, Middle of the night rises are still manageable and worth 4 points. Late rises are basically uncorrectable: you would have to disrupt the kid’s sleep way too early for a correction, and you might be ending up with stacking issues at breakfast. They only get 3 points. Hypo is the worst case scenario and is worth a single point. ND stands for the few nights the Dexcom wasn’t operational (we cover with the Libre) and are given a “neutral” 6 score.
def outcometoscore(outcome):
    if outcome == 'STB':
        return 10
    if outcome == 'TL':
        return 6
    if outcome == 'MR':
        return 4
    if outcome == 'ER':
        return 5
    if outcome == 'LR':
        return 3
    if outcome == 'TH':
        return 6
    if outcome == 'HYP':
        return 1
    if outcome == 'ND':
        return 6


Here  is a visualization of our actual rotation (approx 300 shots) – the diameter of each circle proportional to the number of shots (ok, the area would be better, but the differences wouldn’t be as visible)

Here is the numerical view
Comment: the human mind is not very good at generating truly random series even if it intends to. Remember that there is always a week before a site is reused though.

We favor the lower zones, possibly because they are easier to reach.

our leg distribution is quite good
So is our side randomization
Now, let’s look at outcomes
As you can see, we have less than a third stable nights, quite a few “trending low” nights (easy to fix with a few dextrose tablets when the trend is established), about 40% of sudden unexplained increases and a relatively low number of severe hypos (more about them later). Regardless of what you know, of how careful you are, the variability of nights is a pain.
We observe a fair number of dawn phenomenons, in around 25% of the cases.


Is any site really bad?
It seems there are some differences indeed. However, given the arbitrary scoring system, the small sample size for some sites and confounding factors (more below), a random distribution can’t be excluded.


Height doesn’t seem to be much of a factor either. The lower part of the leg seems to lead to very slightly better outcomes, but that is only, strictly speaking, statistically borderline significant.
Legs are equivalent. That’s a certainty.
The external side of the leg seems to lead to better outcomes (which are heavily weighed towards stable nights).
Another interesting thing to look at is the average score per week day. Saturday is clearly the worst day and that can be explained by the fact that it is often Max’s most intensive tennis day (2.5 hours) where delayed hypos are more frequent. Wednesday is also a “sport day”, with PE in the morning and tennis in the afternoon. That Saturday turns out to also be a significant confounding factor as far as the injection site is concerned: given our weekly rotation basis, the same site may end up being used frequently on Saturdays…


The impact of the exact injection site is limited in the absence of lipodystrophy.
A good site rotation prevents the appearance of lipodystrophies.
Non computer generated site rotation sequences are not optimal.
That type of basic analysis is interesting, but not tremendously helpful in the absences of lipodystrophies. I suspect that they would however be revealed by careful site tracking.
Other approaches yield slightly more interesting results, at the risk of non statistical significance. Some more informed approaches are quite interesting (post sport night sequences). We may get to that in another blog post.

Even with the best effort, in patients who have been able to maintain sub six HbA1c values for 4 1/2 year, who benefit from a favorable environment (dual CGM, reasonably informed dad on duty) T1D teen nights are highly variable.

What? no dosing info?

You may be surprised by the lack of dosing information/analysis. In practice, insulin sensitivity varies tremendously from one individual to an other. We dose “as best as we can”, following all the standard guidelines. The point of this post was simply to look at the possible impact of sites, assess our site rotation.

Wednesday, October 11, 2017

Libre: the “other” bytes (part 3)

Reminder: Max is currently wearing both the Libre and a Dexcom G4 (505 algorithm, “Share” US reader). We take advantage of the Libre speed during the day and for sports. We love the trouble free Dexcom remote transmission at night and, of course, the alerts. We are not running any third party add-on for the Libre as I remain unsatisfied with them. I am still not convinced that a reliable, independent and non infringing third party solution can emerge. I simply treat the “Libre Problem” as a hobby I come back to now and then.
The time has come for a few corrections and additional information.

First Correction

As I said in a previous post, the Libre can potentially use several temperature compensation methods, as described in their patent (1, 2 or 3 points).  To summarize the options
1 point: at least one point (skin) is certain. There’s the huge thermistor sitting in its nice well, and I can interpret its data in relative terms.
2 points: the “skin and board” option, used to estimate the temperature at the sensing site. That option was my favorite for a couple of reasons: other TI FRL processors offer thermistors and I systematically saw two temperature values move as I heated and cooled the sensor. One of those two values was always a bit ahead of the other, which fit nicely with a diffusion gradient. But there is a catch.

3 points: with skin, board and in-situ thermistors. After having looked at microscopic images of the sensing wire, I think that option can be excluded, but as usual can still be wrong.

The catch

It is simple and stupid at the same time. Back in 2014-2015, I immediately split the 6 bytes immediate Libre record into 3 words. One for BG, two moving on temperature changes, with some flags. I was aware of the existence of flags, and did not drop them as I masked the observed values. That left me with a temperature value (thermistor value) that I could interpret directly based on experimental correlation and another that I had no choice but to consider as a delta.

On the plus side
  • I really liked the 2 points compensation design.
  • I had decently working code that I could reliably use for thermal compensation.
On the minus side
  • I was forced to use one value as LSB, the other as MSB and mask and keep the flags.
  • my temperature data had a resolution of 0.7C
Blog reader Robert Gras (r/o/b/e/r/t.gras./3/3at/gmail) pointed out that I would get rid of the 0.7C quantization issue and have a simpler solution by assembling the bytes differently: the well known G value, some flags, the thermistor value, some flags). This feels much cleaner, thank you Robert!
Here’s an example of where I stand right now, with both the immediate values and the historical data.
A few comments
  • that situation doesn’t warrant temperature compensation, at least from my own algorithm point of view, therefore G and Temp compensated G match. It could require a slight tweak if the temperature remains at a lower (relative) level, but I know from experience that a small temperature change needs a few minutes to impact the glucose oxydase activity.
  • the scan and my interpretation match closely (176 vs 180) but that isn’t always the case. While a lot of my sensors match my algorithm nicely, some sensors may appear “off” if one uses a constant interpretation.
  • I have noticed significant behavior differences between my 2014-2015 sensors and the 2016-2017 ones.
  • I am aware that the condition flags would benefit from being displayed in binary form and correlated with events and situations – I have another visualization for that… Maybe later.
  • the interpretation of historical data (the eight hours stored in the FRAM of the reader) is a bit tricky, in the sense that it is delayed, post-processed (smoothed mostly) by the reader and ends up being a bit different when exported by the PC software.


Blog reader R.Z. brought to my attention an additional thermistor that I had missed on the skin temperature sensing circuit. I am told that this type of circuit is a standard, but probably will have to redo my experimental temperature measurements at some point.
In a way, one can say that I lost a thermistor (correction 1, much to my dismay) and that I gained another one….


I’ll keep logging data and situations as I enjoy the hobby.
But, to be honest, I am still depressed when I see open or semi open source solutions, sometimes even commercial add-on products, use a basic approach that I rejected in late 2014 or 2015…
A concerted strategy to make progress (legal progress that is…) would be to collect and document as many situations as possible, too hot, too warm, trending up, trending down, not available, noisy, clean etc… completely. By completely I mean
  • complete data dump (NXPTagInfo for example).
  • simultaneous official scan
  • simultaneous error log if any
However, one should keep in mind that the Libre system is actually quite flexible and that Abbott can and has changed things whenever it wants.

Monday, September 25, 2017

Libre: the "other" bytes (part 2)

Let's now have a look at the behavior of the Libre thermistor derived data in my archetypal case.

Here is the April 2015 view of the incident.

Quick reminder: in a stable BG situation, the impact of a temperature change (bath), compounded by the Libre predictive algorithm, led to a very significant error by the "official" Libre reader. Outside of outright malfunction, this is the only situation where I felt the Libre could have been dangerous.

And here is the "thermistor" informed version.
From a stable condition, jumping into a warm bath, here is what happened to my son's sensor.

T2: a thermistor value I am fairly sure of, at least in relative terms (see previous post), starts to climb. That is expected.

T1: a thermistor related value also shows a marked increase, at least in my interpretation, it is also noisier, as expected based on my understanding. Please note that it is not shown to scale in this chart. My interpretation of it is somewhat arbitrary, and so is the scaling.

RAW measured IG: the green line, starts to rise. This is most likely due to the sensing site becoming warmer as my kid lies in his bath. Since the mass of his body is huge compared to the mass of the sensor and the enzymatic reaction has its own inertia, measured IG starts to rise more slowly. In fact, it is still rising as my son steps out of the bath.

The official Libre scan gives a reading of 194 mg/dL which almost perfectly fits a basic linear prediction based on the few pas minutes (incidentally, the behavior of that prediction algorithm matches almost exactly one prediction algorithm previously documented by Abbott for the calibration of its "full" Navigator CGM. But then, many prediction algorithms would match).

The actual BG was stable. It was double checked with our BGMeter and fit perfectly with the Libre scans prior to the bath and my own interpretation of raw data.

The key question, at least for me, was what could I do with that data.

Well, I could tell when the temperature was rising, what it seemed to add to the raw BG measures, when and how the delay compensation algorithm kicked in. That may seems a lot, but it could also be summarized as "Max, please do not trust the Libre after sudden temperature changes or when the predictive algorithm shows its ugly side." In practice that is all you need to know.

As far as "standard users" are concerned, I could have come up with an algorithm that reflected what I thought an appropriate correction would be and that could have been used in third party implementations. But let's be real for a minute here:

  • I am not foolish enough to believe my algorithm wouldn't be shaky at times. I can't run clinical tests.
  • the Abbott teams are not fools. I would be delusional if I thought I could better them based on incomplete, guessed information.
  • my algorithms (I tried a few) were of course inspired a bit by my own thoughts and a lot by the literature. Even if they had worked flawlessly, I probably would have knowingly and unknowingly trampled a few patents.
  • as I understand things, covering the sensor would not have been a good thing in general.
  • I did not know, in depth, what I was doing. (and I still don't :) )
  • standard users don't care.
That being said, for a while, running a Dexcom/U. Padova inspired smart sensor algorithm on thermal compensated Libre raw data was fun, if very inconvenient.