Skip to main content
Journal of Diabetes Science and Technology logoLink to Journal of Diabetes Science and Technology
. 2021 Jul 20;16(6):1496–1504. doi: 10.1177/19322968211028909

A New Analysis Tool for Continuous Glucose Monitor Data

Evan Olawsky 1, Yuan Zhang 1, Lynn E Eberly 1, Erika S Helgeson 1, Lisa S Chow 2,
PMCID: PMC9631526  PMID: 34282646

Abstract

Background:

With the development of continuous glucose monitoring systems (CGMS), detailed glycemic data are now available for analysis. Yet analysis of this data-rich information can be formidable. The power of CGMS-derived data lies in its characterization of glycemic variability. In contrast, many standard glycemic measures like hemoglobin A1c (HbA1c) and self-monitored blood glucose inadequately describe glycemic variability and run the risk of bias toward overreporting hyperglycemia. Methods that adjust for this bias are often overlooked in clinical research due to difficulty of computation and lack of accessible analysis tools.

Methods:

In response, we have developed a new R package rGV, which calculates a suite of 16 glycemic variability metrics when provided a single individual’s CGM data. rGV is versatile and robust; it is capable of handling data of many formats from many sensor types. We also created a companion R Shiny web app that provides these glycemic variability analysis tools without prior knowledge of R coding. We analyzed the statistical reliability of all the glycemic variability metrics included in rGV and illustrate the clinical utility of rGV by analyzing CGM data from three studies.

Results:

In subjects without diabetes, greater glycemic variability was associated with higher HbA1c values. In patients with type 2 diabetes mellitus (T2DM), we found that high glucose is the primary driver of glycemic variability. In patients with type 1 diabetes (T1DM), we found that naltrexone use may potentially reduce glycemic variability.

Conclusions:

We present a new R package and accompanying web app to facilitate quick and easy computation of a suite of glycemic variability metrics.

Keywords: continuous glucose monitoring, glycemic variability, R

Introduction

Both type 1 diabetes (T1DM) and type 2 diabetes (T2DM) disrupt normal glucose regulation. Regardless of diabetes type, people with diabetes commonly struggle with the effects of hyper- and hypoglycemia, which can increase long-term risk for cardiovascular disease and other comorbidities. 1 As an example, recurrent hypoglycemia can reduce the body’s awareness of hypoglycemia and hinder self-regulation. 2 Therefore, an important research goal in diabetes is to understand and monitor glycemic patterns. Traditionally, glycemic control has been assessed using simple composite measures such as hemoglobin A1c (HbA1c), which represents average blood glucose levels from the past two to three months, or fasting blood glucose. Additional information can be obtained when patients self-monitor their blood glucose by multiple fingersticks, typically one to six times per day; yet this self-monitoring often results in incomplete and potentially inaccurate data. 3

The advent of continuous glucose monitoring systems (CGMS) has led to the availability of detailed glucose data. CGMSs capture a person’s interstitial glucose at regular time intervals, typically once every five or 15 min, for up to two weeks. Continuous monitoring of glucose levels can give a more detailed understanding of a patient’s level of glycemic control beyond traditional composite measures. The high density of data arising from CGMS, however, poses formidable data analysis and interpretation

challenges. Yet, these data have the potential to improve our understanding of glycemic profiles, predict development of diseases and health conditions, and improve clinical care for individuals with diabetes.

Many metrics have been proposed in the diabetes literature12-24 to summarize an individual’s glucose profile, with specific emphasis on quantifying glycemic variability over one to two weeks. Glycemic variability, loosely defined as fluctuations in glucose levels within a day or across several days, 4 is related to many adverse events including poorer quality of life 5 and increased risk of cardiovascular events, 6 hypoglycemia, and mortality. 7

Brown et al 8 note that standard measures of glycemic profile such as mean glucose, standard deviation (SD), and coefficient of variation (CV) fail to adequately describe glycemic variability and can be biased towards overreporting hyperglycemia. Methods such as low and high blood glucose index (LBGI/HBGI), average daily risk range (ADRR), and glycemic risk assessment diabetes equation (GRADE) adjust for this bias but are often neglected in clinical research due to difficulty of computation. 9 Many of the glycemic variability metrics proposed in the literature are complicated to compute and are typically not included in CGM reports. To date, there remains a paucity of publicly available tools that researchers and clinicians can use to calculate glycemic variability metrics.

In this paper, we demonstrate the use of a new R package (rGV) and web-based tool which calculates a suite of 16 metrics when provided CGM data from a single individual. While previous work has shown that many of these metrics are highly correlated and thus provide overlapping information, 10 we present a large list of metrics so that researchers may choose which to focus on. While other software such as EasyGV, 11 GLU, 12 cgmanalyzer, 13 and cgmanalysis 14 can also calculate these metrics, they do not provide these metrics in an easy-to-use web-based tool that requires no prior coding knowledge. To our knowledge only one other web-based CGM analysis tool, iglu, 40 exists, but with different functionality than rGV. We illustrate the clinical utility of rGV by analyzing CGM data from three clinical studies in participants across the glycemic spectrum. We hypothesize that a wide range of glycemic variability metrics, including those not commonly used in clinical research, have relationships with clinical health outcomes.

Materials and Methods

Study Samples

CGM data were collected during three separate studies performed at the University of Minnesota (described below: NCT03129581, NCT03481530, NCT01053078); all studies were approved by the University’s Human Subjects Protection Program. The participants of the three studies (n = 54 in total) represent a broad range of glycemic levels and variability—subjects included individuals without diabetes as well as participants with T1DM or T2DM. Glucose was monitored by Freestyle Libre Pro sensors (15-minute inter-sample interval) in two studies (NCT03129581, NCT03481530), and by Dexcom Seven Plus sensors (5-minute inter-sample interval) in one study (NCT01053078).

The first dataset comes from an ongoing study (2018-present) on long-term hypoglycemic risk (NCT03481530), where CGM data were collected from 18 subjects with T2DM (ten females, eight males) prior to any intervention. Participants had an average age of 59.5 years (SD 12.3 years) and an average HbA1c of 7.6% (1.3%). All participants were assessed as having either high (n = 10) or low (n = 8) five-year risk for hypoglycemia as determined by risk models developed from the ACCORD trial. 15 The risk groups did not show significant differences in HbA1c (p = .095) or fructosamine (p = .076). Each subject wore two Freestyle Libre Pro sensors simultaneously, one on each arm, for two weeks. All subjects were blinded to readings from the sensors. We compared differences in glycemic variability at the start of the study between the high- and low-risk groups and estimated the test-retest variability for each metric between the two sensors simultaneously worn by each subject.

The second dataset was collected from 2017 to 2019 in the SeeFood Study (NCT03129581), where 22 obese subjects without self-reported diabetes were randomized to either time-restricted eating (n = 13) or unrestricted eating (n = 9) for 12 weeks. 16 For this analysis, we used the blinded Freestyle Libre results (up to two weeks) obtained prior to randomization. We examined whether participants without diabetes but with dysglycemia had different glucose variability metrics than those without diabetes and without dysglycemia. Three definitions of dysglycemia were considered:

  1. HbA1c based: Participants with HbA1c at or above 5.7% are considered dysglycemic (n = 7), and those with HbA1c below 5.7% are euglycemic (n = 15). 17

  2. Homeostatic model assessment of insulin resistance (HOMA-IR) based: Participants with HOMA-IR scores 18 at or above 2.5 mg/dL are dysglycemic (n = 8), and those with HOMA-IR scores below 2.5 mg/dL are euglycemic (n = 13). 19

  3. Matsuda based: Participants with Matsuda Index 20 at or above 4 are dysglycemic (n = 9), and those with Matsuda Index below 4 are euglycemic (n = 11).

The final dataset comes from a pilot study (2009-2014) to assess the use of naltrexone as a treatment for impaired awareness of hypoglycemia in individuals with T1DM (NCT01053078). 21 Subjects were randomized to receive either oral naltrexone (n = 6) or placebo (n = 8) for four weeks. Each subject wore a Dexcom Seven Plus CGM sensor for the week immediately preceding treatment and again for the final week of the four-week treatment period. Subjects were blinded to the monitor’s glucose readings. The effect of naltrexone on glucose variability is of interest; therefore, we will compare the between-group differences in glycemic variability from the week preceding treatment to glycemic variability in the final week of treatment.

Data Analysis

Data analysis was performed using R software with package rGV. R is a free, user-developed environment and language for statistical computing and graphics. R is available as Free Software under a General Public License in source code form; it compiles and runs on Windows, MacOS, and a wide variety of UNIX and UNIX-like platforms (https://www.r-project.org/about.html). Users can expand R’s functionality by writing new functions and packages; instructions on how to access rGV are given at the end of this article. This section will briefly describe the capabilities of this package.

Our package, rGV, is flexible to the structure of the CGMS data that the user wishes to input. Given a CSV file, the function “read.CGM” returns a data frame with a time stamp and glucose value for each entry in the original data. With the proper inputs, this function can handle a broad range of data formats, including issues such as extraneous header lines, additional data columns, incomplete observations, a wide range of date and time formats, censored data (ie, “Low” or “High” in place of a numeric value), observations where the CGMS is performing calibration, and data sets from multiple sensors in one file. This flexibility makes the package capable of handling data from different CGM devices, such as Freestyle Libre Pro or Dexcom.

After data are transformed to the correct format using the read.CGM function, the package comes with a number of functions that calculate measures of glycemic variability proposed in the diabetes literature. For a complete list of these metrics and their formulas, see the technical appendix. These metrics fall into three broad categories.

  • 1) Simple functions of the mean or SD of the glucose data. These include SD, CV, the glucose management indicator 22 (GMI), and the J-index. 23

  • 2) Deviation in glucose levels over specific time windows. Examples are continuous overall net glycemic action 24 (CONGA), lability index 25 (LI), mean of daily differences 26 (MODD), mean absolute glucose 27 (MAG), distance travelled, 28 and glycemic variability percentage 29 (GVP).

  • 3) Frequency and/or magnitude of extreme glucose values: LBGI/HBGI,30-32 M-value, 33 GRADE, 34 area under the curve (AUC), mean amplitude of glycemic excursions 35 (MAGE, calculated using the Baghurst algorithm 36 ), ADRR, 37 time spent in a user-specified range 38 (TIR), and number of episodes per day. The GV() function will return the entire suite of metrics for a given glucose trajectory.

The GV() function will return the entire suite of metrics for a given glucose trajectory.

The package also contains several functions for creating visualizations of the data. Once the data are read in using read.CGM, one can easily create plots of blood glucose over time, changes in blood glucose over specified time intervals, and “symmetrized” blood glucose values (used in the calculation of LBGI/HBGI and ADRR) over time.

In addition to the rGV package in R, we have built a web app through the R Shiny interface that allows the user to perform glycemic variability analyses without R. The app, located online at https://shiny.biostat.umn.edu/GV/, offers all of the same options as the R package and returns the same outputs. For clinical researchers unfamiliar with R or other programming languages, the app is a user-friendly way to read-in and analyze CGM data. Figure 1 shows a screenshot of the app after a dataset has been read in.

Figure 1.

Figure 1.

Illustration of the rGV app. Users upload data and specify time inputs in the fields in the left screen. Users specify units and thresholds for CGM metrics in the top-center fields. Results in tabular and plot forms are provided in the center of the screen. Abbreviation: CGM, continuous glucose monitoring.

Statistical Analysis

To assess reliability of glycemic variability metrics, we calculate the test-retest CV for each metric within each subject. This is equal to the SD of two repeated measures on the same subject divided by their mean. A small test-retest CV indicates that the value of a metric is consistent across arms. Two-sample t-tests are used to test for group differences. P values are unadjusted for multiple comparisons unless otherwise specified. P values less than .05 were considered statistically significant.

Results

Test-Retest variability

We used the data from the hypoglycemia risk study (NCT03481530) to analyze the reliability of the CGMS data (Table 1) . Participants (n = 18) wore two CGM sensors, one on each arm, giving us two data sources for each individual over the course of the two-week study. For each participant, we calculate the full suite of glycemic variability metrics twice—once for each arm—and then calculate the test-retest CV. We note that this reliability analysis is specific to the Freestyle Libre Pro devices used in this study. The most reliable metrics (metrics with the smallest test-retest CV) included GMI (test-retest CV = 0.03), CV (0.04), SD (0.04), CONGA with n = 1 (0.05), MODD (0.05), and mean glucose (0.05). Metrics that emphasize glycemic excursions—such as AUC (0.56), % TIR<54 (0.54) and % TUR>250 (0.31)—were the least reliable.

Table 1.

Test-Retest Variability of CGM Metrics in Hypoglycemia Risk Study (n = 18).

Measure 42 Test-retest CV
GMI 0.03
Coefficient of variation 0.04
Standard deviation 0.04
CONGA (n=1) 0.05
MODD 0.05
Mean glucose 0.05
ADRR 0.07
MAG 0.08
Lability index 0.09
J-index 0.09
GRADE 0.09
GRADE hyper % 0.09
M-value (R = 120 mg/dL) 0.09
MAGE 0.09
% Time in range70-180 0.10
GVP 0.11
% Time in range181-250 0.16
HBGI 0.19
GRADE Eu % 0.20
Distance travelled 0.23
% Time in range>250 0.31
Number of events below 55 mg/dL 0.37
Number of events below 70 mg/dL 0.40
% Time in range54-69 0.47
GRADE hypo % 0.53
% Time in range<54 0.54
LBGI 0.55
Area under the curve, threshold 140 mg/dL (min × mg/dL) 0.56

Abbreviations: ADRR, average daily risk range; CGM, continuous glucose monitoring; GMI, glucose management indicator; GRADE, glycemic risk assessment diabetes equation; GVP, glycemic variability percentage; HBGI, high blood glucose index; LBGI, low blood glucose index; MAG, mean absolute glucose; MAGE, mean amplitude of glycemic excursions; MODD, mean of daily differences.

Relevance to Clinical Studies

SeeFood Study (NCT03129581)

In this study of participants without self-described diabetes (NCT03129581), many significant differences were found between subjects classified into dysglycemic and euglycemic groups by their HbA1c values (Table 2). Subjects with HbA1c greater than or equal to 5.7 (n = 7) had significantly higher mean glucose (P = .011), J-index (P = .015), HBGI (P = .046), and GMI (P = .011) than subjects with HbA1c below 5.7 (n = 15). Dysglycemic subjects also had significantly lower LBGI (P = .005), experienced fewer episodes of hypoglycemia (blood glucose below 70 mg/dL for at least 20 minutes; P = .015) and spent less time with glucose levels below 100 mg/dL (% TIR70-99, P = .035). There were no significant differences between groups in any of the metrics when the groups were determined by Matsuda or HOMA-IR instead of HbA1c (data not shown).

Table 2.

Comparison of CGM Metrics Between Euglycemic and Dysglycemic Groups in SeeFood Study.

Measure [mean (SD)]42 HbA1c < 5.7 (n = 15) Hba1c ≥ 5.7 (n = 7) P value (bold<.05)
HbA1c (%) 5.23 (0.33) 5.96 (0.10)
Mean glucose (mg/dL) 88.64 (5.99) 100.35 (8.66) .011
Standard deviation (mg/dL) 15.56 (3.21) 19.65 (5.62) .111
CONGA1 16.64 (3.45) 19.6 (3.38) .082
Lability index 287.73 (118.6) 393.51 (127.67) .091
J-index 10.91 (1.53) 14.53 (2.89) .015
LBGI 3.4 (1.36) 1.85 (0.89) .005
HBGI 0.06 (0.06) 0.3 (0.25) .046
GRADE 1.24 (0.81) 1.49 (0.64) .457
GRADE hypo % 0.39 (0.23) 0.18 (0.13) .011
GRADE Eu % 0.54 (0.19) 0.6 (0.16) .476
GRADE hyper % 0.07 (0.07) 0.22 (0.17) .049
MODD 14.39 (3.33) 16.69 (4.55) .263
MAGE 24.93 (7.55) 34.20 (13.49) .130
ADRR high 14.09 (4.21) 13.92 (4.28) .930
M-value (R = 120 mg/dL) 11.28 (2.94) 9.68 (1.77) .130
MAG 21.41 (3.36) 26.32 (14.18) .399
Coefficient of variation 0.18 (0.04) 0.19 (0.05) .410
Area under the curve, threshold 140 mg/dL (min × mg/dL) 3630.2 (2822.8) 10578.5 (7985.7) .062
% Time in range70-99 70.62 (10.51) 51.1 (19) .035
% Time in range100-139 19.98 (10.49) 39.88 (18.13) .027
% Time in range140-180 1.15 (1.13) 4.96 (4.51) .067
GMI 5.43 (0.14) 5.71 (0.21) .011
GVP 10.96 (3.01) 18.43 (18.77) .340
Distance travelled 5250.13 (1633.1) 8428.86 (10063) .440
Number of episodes below 54 for at least 20 mins 0.12 (0.17) 0.05 (0.07) .196
Number of episodes below 70 for at least 20 mins 1.01 (0.81) 0.38 (0.3) .015

Abbreviations: ADRR, average daily risk range; CONGA, continuous overall net glycemic action; CGM, continuous glucose monitoring; GMI, glucose management indicator; GRADE, glycemic risk assessment diabetes equation; GVP, glycemic variability percentage; hbA1c, hemoglobin A1c; HBGI, high blood glucose index; LBGI, low blood glucose index; MAG, mean absolute glucose; MAGE, mean amplitude of glycemic excursions; MODD, mean of daily differences.

Hypoglycemic Risk Study (NCT03481530)

In this study, all participants had T2DM and were stratified into high or low five-year risk for hypoglycemia based on risk models developed from the ACCORD trial. Differences in HbA1c (P = .095) and fructosamine (P = .076) between the high- and low-risk groups were not significant (Table 3). However, there were significant differences between groups in several of the glucose variability metrics mentioned above: CV (P = .029), SD (P = .013), MAGE (P = .012), and MODD (P = .022). In all three metrics, the high-risk group showed greater glycemic variability than the low-risk group. Regardless of risk group status, short-term hypoglycemia was infrequent, as shown by the TIR metrics. The low-risk group spent an average of 4.47% of the time with glucose at or below 70 mg/dL, while the high-risk group spent only 3.96% of the time in this range. On the other hand, the high-risk group experienced more hyperglycemia, with high-risk participants spending 42.45% of the time with blood glucose above 180 mg/dL and low-risk participants spending only 29.64% of the time in the same category.

Table 3.

Comparisons of HbA1c, Fructosamine, and CGM Metrics Between High- and Low-Risk Groups in Hypoglycemic Risk Study.

Measure [mean (SD)]42 High five-year hypoglycemia risk (n = 10) Low five-year hypoglycemia risk (n = 8) P value (bold<.05)
HbA1c (%) 8.11 (0.89) 7.03 (1.48) .095
Fructosamine (mmol/L) 320.1 (47.6) 282.3 (36.9) .076
Coefficient of variation 0.33 (0.07) 0.26 (0.06) .029
Standard deviation (mg/dL) 56.73 (9.36) 38.67 (15.17) .013
MODD 54.43 (10.16) 37.17 (16.07) .022
MAGE 109.03 (23.04) 71.39 (30.33) .012
Number of events <54 mg/dL per day 0.49 (1.31) 0.29 (0.46) .66
Number of events <70 mg/dL per day 1.05 (1.72) 1.67 (2.18) .053
% Time in range<54 1.9 (5.35) 0.51 (0.8) .439
% Time in range54-69 2.06 (3.59) 3.96 (5.09) .389
% Time in range70-180 53.6 (19.44) 65.89 (32.53) .366
% Time in range181-250 26.96 (7.42) 20 (22.19) .419
% Time in range>250 15.49 (18.63) 9.64 (14.55) .465

Additional glycemic variability measures which were not significantly different (P > .05) between the two groups include: CONGA, lability index, J-index, LBGI, HBGI, GRADE, ADRR, MAG, MAGE, M-value, GMI, mean glucose.

Abbreviations: ADRR, average daily risk range; CONGA, continuous overall net glycemic action; CGM, continuous glucose monitoring; GMI, glucose management indicator; GRADE, glycemic risk assessment diabetes equation; GVP, glycemic variability percentage; hbA1c, hemoglobin A1c; HBGI, high blood glucose index; LBGI, low blood glucose index; MAG, mean absolute glucose; MAGE, mean amplitude of glycemic excursions; MODD, mean of daily differences.

Naltrexone Study (NCT01053078)

Unlike the previously mentioned studies (which used Freestyle Libre Pro sensors), this study (NCT01053078) used Dexcom devices to gather CGM data. In this study of individuals with T1DM and impaired awareness of hypoglycemia, glucose was monitored for one week both before treatment randomization (naltrexone or placebo) and in the final week of the four-week treatment regime. We compare the differences between the pre-treatment and post-treatment glucose variability metrics within the naltrexone and placebo groups. Perhaps in part due to the small sample size of the pilot study, there were no significant results after adjusting for multiple comparisons with a Holm correction 39 (results not shown). However, there is some evidence that the naltrexone group saw a larger decrease in poor glycemic outcomes than the placebo group did (Table 4). This is shown by the fact that, while not reaching significant levels, most of the mean differences comparing pre- and post-treatment variability metrics are negative (whereas most of the placebo group mean differences are positive), indicating that the naltrexone group saw larger decreases in (among others) GRADE, MAG, M-value (with R = 120 mg/dL), LBGI, % TIR<54 and % TIR>250 than the placebo group. We also use this data to compare the values of rGV’s functions to those of the cgmanalysis package, as shown in Table 5.

Table 4.

Group Comparisons of CGM Metrics for Naltrexone Study.

Measure [mean (SD)]42 Treatment group difference (n = 6) Placebo group difference (n = 8) t statistic Unadjusted P value
ADRR −4.39 (6.21) −0.55 (15.6) −0.632 .542
Area under the curve −1170.75 (4044.63) 533.88 (2992.56) −0.869 .408
CONGA1 −3.07 (9.95) −1.4 (10.65) −0.303 .768
Coefficient of variation −0.05 (0.08) −0.05 (0.09) 0.018 .986
GMI 0.07 (0.58) 0.36 (1.12) −0.628 .543
GRADE −1.49 (2.52) 1.93 (6.1) −1.433 .183
GRADE Eu % 0.03 (0.03) −0.01 (0.07) 1.369 .202
GRADE hyper % 0.09 (0.23) 0.03 (0.15) 0.569 .585
GRADE hypo % −0.12 (0.25) −0.02 (0.13) −0.902 .396
HBGI −0.63 (3.01) 2.1 (8.3) −0.861 .411
J-index −2.03 (14.43) 5.49 (29.3) −0.632 .541
LBGI −1.72 (3.14) −0.24 (2) −1.013 .341
Lability index −387.8 (883.32) −30.91 (1437.14) −0.573 .578
M-value (R = 120 mg/dL) −5.69 (6.67) 2.53 (18.41) −1.165 .273
MAG −7.74 (14.53) 8.03 (30.62) −1.278 .229
MAGE 0.4 (30.16) 0.74 (46.0) −0.016 .987
Mean glucose (mg/dL) 2.98 (24.15) 15.08 (46.82) −0.628 .543
MODD −5.86 (12.86) −4.46 (28.65) −0.116 .91
Number of episodes below 54 mg/dL −0.25 (1.23) −0.26 (0.49) 0.034 .974
Number of episodes below 70 mg/dL −0.49 (1.14) −0.5 (0.72) 0.008 .994
Standard deviation (mg/dL) −4.66 (15.92) −3.78 (20.36) −0.091 .929
% Time in range<70 −4.14 (8.7) 0.65 (5.78) −1.169 .275
% Time in range70-99 −2.32 (2.77) −2.41 (2.64) 0.062 .951
% Time in range100-139 7.35 (14.48) −6.17 (26.93) 1.206 .253
% Time in range140-180 1.97 (11.75) 1.81 (5.41) 0.031 .976
% Time in range>180 −2.86 (5.52) 6.11 (23.09) −1.06 .32
GVP −12.07 (17.02) 7.77 (35.59) −1.381 .196
Distance travelled 397.83 (3391.43) −229.75 (2397.39) .387 .708

Abbreviations: ADRR, average daily risk range; CONGA, continuous overall net glycemic action; CGM, continuous glucose monitoring; GMI, glucose management indicator; GRADE, glycemic risk assessment diabetes equation; GVP, glycemic variability percentage; hbA1c, hemoglobin A1c; HBGI, high blood glucose index; LBGI, low blood glucose index; MAG, mean absolute glucose; MAGE, mean amplitude of glycemic excursions; MODD, mean of daily differences.

Table 5.

Correlations Between rGV and cgmanalysis 14 Metrics for Naltrexone Study Data.

Metric 42 Correlation
Coefficient of variation 1.000
CONGA1 0.999
GMI 0.999
HBGI 0.942
J-index 1.000
LBGI* 0.828
MAGE 1.000
MODD 0.978
Standard deviation 1.000
*

The correlation for LBGI is low because of differences between the two software packages in calculation of the metric. rGV following the formula described by Kovatchev et al. 31 Both packages find the glucose transformation f(BG) and then the quadratic risk function r(BG) = 10*f(BG). 2 LBGI is the mean of rl(BG), where rGV sets rl(BG) = r(BG) if f(BG) is negative and sets rl(BG) = 0 otherwise. In contrast, the cgmanalysis package sets LBGI to be the mean of all positive rl(BG) values (ie, it does not average in 0s for the non-positive values).

Discussion

In this study, we have illustrated that quantifying glycemic variability from CGM data represents an opportunity to expand our knowledge of glycemic control. Unfortunately, the current practice is to quantify glycemic control by HbA1c or fasting glucose and glycemic variability by simple measures such as SD and CV. While easy to calculate, these metrics present the risk for bias toward hyperglycemia. Metrics that avoid such biases and provide a more detailed snapshot of glycemic variability, such as LBGI, HBGI, GRADE, and others have often been underused clinically because of the difficulty of computing them. 5 To ease the computational burden of performing such in-depth analysis of CGM data, we presented a new R package rGV and accompanying web app that allow for easy computation and visualization of a host of glycemic variability metrics.

Our work complements the current literature. While there is an existing Excel macro that performs much of the same analysis (EasyGV 11 ), the rGV package is much more flexible to different data formats and has the ability to read-in raw CSV output from a sensor. rGV also computes several metrics that are not available in EasyGV, including GMI, CV, and TIR.

For reference, we used the naltrexone data to compare the results relative to the cgmanalysis package for the nine metrics calculated by both packages (CONGA1, CV, GMI, HBGI/LBGI, J-index, MAGE, MODD, and SD). The results can be found in Table 5. For all metrics except HBGI/LBGI, correlation between rGV and cgmanalysis was above 0.975, with small differences explained by rounding in cgmanalysis output. The discrepancy in HBGI/LBGI values arises from differences in calculation, with rGV following the formula described by Kovatchev et al. 30 Both packages find the glucose transformation f(BG) and then the quadratic risk function r(BG) = 10*f(BG). 2 LBGI is the mean of rl(BG), where rGV lets rl(BG) = r(BG) if f(BG) is negative and 0 otherwise. rGV follows this process correctly while the cgmanalysis package instead lets LBGI be the mean of all positive rl(BG) values.

The new iglu R package 40 has many of the same functionalities as rGV and is another excellent tool for assessing glycemic variability in CGM data. However, we believe that rGV is more flexible when reading in CGM data, as rGV can (1) explicitly handle many different date-time formats, (2) exclude marked “calibration” rows from analysis, (3) replace “high” and “low” glucose indicators with specific values, and (4) separate out multiple sensors whose data comes from a single file.

Using rGV, we made the following clinical observations. In patients without diabetes, we observed that greater glycemic variability was associated with higher HbA1c values. In patients with T2DM, we found that high glucose is a primary driver of glycemic variability, confirming the findings of Rodbard, 41 among others. This implies that care of patients with high short-term glycemic variability should focus on ameliorating the risks of hyperglycemia in the future. In patients with T1DM and impaired awareness of hypoglycemia, we found some evidence that naltrexone may reduce glycemic variability. This suggests an avenue for possible further research. Our findings show that metrics of glycemic variability beyond SD and CV can illuminate new information about glycemic control.

The strengths of this work include the following: the rGV package and the accompanying web app will allow future researchers to quickly and easily compute a wide range of glycemic variability metrics that can facilitate more in-depth research into glycemic trajectories and their impact on health outcomes.

Limitations exist. While computing a large list of metrics can offer a full picture of a patient’s level of glycemic control, there is also the possibility that clinicians may be overwhelmed by the sheer amount of information, much of which is overlapping. Furthermore, hypothesis testing involving many metrics will need to be adjusted for multiple comparisons in order to avoid highly increased rates of Type I error. Like any other kind of data analysis, care must be taken to ensure the clinical relevance of the described findings. Finally, recent work by Moscardo et al 42 shows that some metrics are much better at discriminating between different subjects in small samples, work that is potentially of interest in interpreting the output of rGV.

Conclusion

In conclusion, we have presented a new R package and accompanying web app to facilitate quick and easy computation of a suite of glycemic variability metrics, some of which have been under-utilized by the research community due to their computational complexity.

Supplemental Material

sj-pdf-1-dst-10.1177_19322968211028909 – Supplemental material for A New Analysis Tool for Continuous Glucose Monitor Data

Supplemental material, sj-pdf-1-dst-10.1177_19322968211028909 for A New Analysis Tool for Continuous Glucose Monitor Data by Evan Olawsky, Yuan Zhang, Lynn E Eberly, Erika S Helgeson and Lisa S Chow in Journal of Diabetes Science and Technology

Acknowledgments

Data Sources: We wish to thank Dr. Elizabeth R. Seaquist for providing data used in this work.

Footnotes

Summary: We present a new R package and accompanying web app to facilitate quick and easy computation of a suite of glycemic variability metrics.

Abbreviations: ADRR: average daily risk range; AUC: area under the curve; CGMS: continuous glucose monitoring system; CONGA: continuous overall net glycemic action; CSV: comma separated values; CV: coefficient of variation; GMI: glucose management indicator; GRADE: glycemic risk assessment diabetes equation; GVP: glycemic variability percentage; HbA1c: hemoglobin A1c; HBGI: high blood glucose index; HOMA-IR: homeostatic model assessment of insulin resistance; LBGI: low blood glucose index; LI: lability index; MAG: mean absolute glucose; MAGE: mean amplitude of glycemic excursions; MODD: mean of daily differences; SD: standard deviation; T1DM: type 1 diabetes mellitus; T2DM: type 2 diabetes mellitus; TIR: time in range.

Author Contributions: EAO wrote and edited the paper, analyzed the data, and wrote the software. YZ analyzed the data, wrote and edited the paper, and wrote and edited the software. LEE designed research, analyzed the data, wrote and edited the paper, and edited the software. ESH analyzed the data and wrote and edited the paper. LSC designed and conducted research, analyzed the data, and wrote and edited the paper. LSC has primary responsibility for final content. All authors read and approved the final manuscript.

Technical Details: The base R environment can be downloaded and installed by following instructions at https://www.r-project.org. Our rGV package can be downloaded and installed by using the install.packages command in R. Many users prefer to access R through a user-friendly front-end called R Studio, also free and available at https://rstudio.com/products/rstudio/download/. Alternatively, for analysis of one CGM data set at a time without needing to know R programming, our R Shiny app can be accessed at https://shiny.biostat.umn.edu/GV/.

Trial Registration: Clinicaltrials.gov NCT03129581, NCT01053078, NCT03481530

The author(s) declared the following potential conflicts of interest with respect to the research, authorship, and/or publication of this article: LSC has received a grant from DEXCOM to provide product-only (ie, no salary support) for her research.

LSC has an investigator-initiated grant from DEXCOM (product only).

Funding: The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Institutes of Health (1R01-DK099137). Research reported in this publication was supported by the Healthy Foods Healthy Lives program (17SFR-2YR50LC to LSC), the Academic Health Center (AHC-FRD-17-08 to LSC), the National Institutes of Health (NIH National Center for Advancing Translational Sciences, UL1TR002494 and UL1TR000114), the American Diabetes Association, and Clinical and Translational Science Award 5KL2TR113. Clinical trials registration numbers for the three trials whose data was used in this work are: NCT03129581, NCT01053078, and NCT03481530.

Supplemental Material: Supplemental material for this article is available online.

References

  • 1. Goto A, Arah OA, Goto M, Terauchi Y, Noda M. Severe hypoglycaemia and cardiovascular disease: systematic review and meta-analysis with bias analysis. BMJ. 2013;347:f4533. [DOI] [PubMed] [Google Scholar]
  • 2. Cryer PE. Mechanisms of hypoglycemia-associated autonomic failure and its component syndromes in diabetes. Diabetes. 2005;54(12):3592-3601. [DOI] [PubMed] [Google Scholar]
  • 3. Dungan K, Verma N. Monitoring technologies – continuous glucose monitoring, mobile technology, biomarkers of glycemic control. In: Endotext. MDText.com, Inc.; 2018. [Google Scholar]
  • 4. Rodbard D. The challenges of measuring glycemic variability. J Diabetes Sci Technol. 2012;6(3):712-715. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5. Penckofer S, Quinn L, Byrn M, Ferrans C, Miller M, Strange P. Does glycemic variability impact mood and quality of life? Diabetes Technol Ther. 2012;14 (4):303-310. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6. Suh S, Kim KH. Glycemic variability: how do we measure it and why is it important? Diabetes Metab J. 2015;39(4):273-282. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Zinman B, Marso SP, Poulter NR, et al. Day to day fasting glycaemic variability in DEVOTE: associations with severe hypoglycaemia and cardiovascular outcomes (DEVOTE 2). Diabetologia. 2018;61(1):48-57. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8. Brown SA, Basu A, Kovatchev BP. Beyond HbA1c: using continuous glucose monitoring metrics to enhance interpretation of treatment effect and improve clinical decision-making. Diabet Med. 2019;36(6):679-687. [DOI] [PubMed] [Google Scholar]
  • 9. Monnier L, Colette C, Owens DR. The application of simple metrics in the assessment of glycaemic variability. Diabetes Metab. 2018;44(4):313-319. [DOI] [PubMed] [Google Scholar]
  • 10. Fabris C, Facchinetti A, Sparacino G, et al. Glucose variability indices in type 1 diabetes: parsimonious set of indices revealed by sparse principal component analysis. Diabetes Technol Ther. 2014;16(10):644-652. [DOI] [PubMed] [Google Scholar]
  • 11. Moscardó V, Giménez M, Oliver N, Hill NR. Updated software for automated assessment of glucose variability and quality of glycemic control in diabetes. Diabetes Technol Ther. 2020;22(10):701-708. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12. Millard LAC, Patel N, Tilling K, Lewcock M, Flach PA, Lawlor DA. GLU: a software package for analyzing continuously measured glucose levels in epidemiology. Int J Epidemiol. 2020;49(3):744-757. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13. Zhang XD, Zhang Z, Wang D. CGManalyzer: an R package for analyzing continuous glucose monitoring studies. Bioinformatics. 2018;34(9):1609-1611. [DOI] [PubMed] [Google Scholar]
  • 14. Vigers T, Chan CL, Snell-Bergeon J, et al. cgmanalysis: an R package for descriptive analysis of continuous glucose monitor data. PLoS One. 2019;14(10):e0216851. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15. Chow LS, Zmora S, Ma S, Seaquist ER, Schreiner PJ. Development of a model to predict 5-year risk of severe hypoglycemia in patients with type 2 diabetes. BMJ Open Diabetes Res Care. 2018;6(1):e000527. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16. Chow LS, Manoogian ENC, Alvear A, et al. Time-restricted eating effects on body composition and metabolic measures in humans who are overweight: a feasibility study. Obesity (Silver Spring). 2020;28(5):860-869. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17. American Diabetes Association. Classification and diagnosis of diabetes: standards of medical care in diabetes-2020. Diabetes Care. 2020;43(suppl 1):S14-S31. [DOI] [PubMed] [Google Scholar]
  • 18. Matthews DR, Hosker JP, Rudenski AS, Naylor BA, Treacher DF, Turner RC. Homeostasis model assessment: insulin resistance and beta-cell function from fasting plasma glucose and insulin concentrations in man. Diabetologia. 1985;28(7):412-419. [DOI] [PubMed] [Google Scholar]
  • 19. Petersen KF, Dufour S, Befroy D, et al. Impaired mitochondrial activity in the insulin-resistant offspring of patients with type 2 diabetes. N Engl J Med. 2004;350(7):664-671. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Matsuda M, DeFronzo RA. Insulin sensitivity indices obtained from oral glucose tolerance testing: comparison with the euglycemic insulin clamp. Diabetes Care. 1999;22(9):1462-1470. [DOI] [PubMed] [Google Scholar]
  • 21. Moheet A, Mangia S, Kumar A, et al. Naltrexone for treatment of impaired awareness of hypoglycemia in type 1 diabetes: a randomized clinical trial. J Diabetes Complications. 2015;29(8):1277-1282. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22. Bergenstal RM, Beck RW, Close KL, et al. Glucose management indicator (GMI): a new term for estimating A1c from continuous glucose monitoring. Diabetes Care. 2018;41(11):2275-2280. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Wojcicki JM. “J”-Index: a new proposition of the assessment of current glucose control in diabetic patients. Horm Metab Res. 1995;27(1):41-42. [DOI] [PubMed] [Google Scholar]
  • 24. McDonell CM, Donath SM, Vidmar SI, Werther GA, Cameron FJ. A novel approach to continuous glucose analysis utilizing glycemic variation. Diabetes Technol Ther. 2005;7(2):253-263. [DOI] [PubMed] [Google Scholar]
  • 25. Ryan EA, Shandro T, Green K, et al. Assessment of the severity of hypoglycemia and glycemic lability in type 1 diabetic subjects undergoing islet transplantation. Diabetes. 2004;53:955-962. [DOI] [PubMed] [Google Scholar]
  • 26. Molnar GD, Taylor WF, Ho MM. Day-to-day variation of continuously monitored glycaemia: a further measure of diabetic instability. Diabetologia. 1972;8(5):342-348. [DOI] [PubMed] [Google Scholar]
  • 27. Hermanides J, Vriesendorp TM, Bosman RJ, Zandstra DF, Hoekstra JB, Devries JH. Glucose variability is associated with intensive care unit mortality. Crit Care Med. 2010;38(3):838-842. [DOI] [PubMed] [Google Scholar]
  • 28. Marling CR, Shubrook JH, Vernier SJ, Wiley MT, Schwartz FL. Characterizing blood glucose variability using new metrics with continuous glucose monitoring data. J Diabetes Sci Technol. 2011;5(4):871-878. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Peyser TA, Balo AK, Buckingham BA, Hirsch IB, Garcia A. Glycemic variability percentage: a novel method for assessing glycemic variability from continuous glucose monitor data. Diabetes Technol Ther. 2018;20(1):6-16. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30. Rodbard D. Interpretation of continuous glucose monitoring data: glycemic variability and quality of glycemic control. Diabetes Technol Ther. 2009;11(suppl 1):S55-S67. [DOI] [PubMed] [Google Scholar]
  • 31. Kovatchev BP, Cox DJ, Kumar A, Gonder-Frederick L, Clarke WL. Algorithmic evaluation of metabolic control and risk of severe hypoglycemia in type 1 and type 2 diabetes using self-monitoring blood glucose data. Diabetes Technol Ther. 2003;5(5):817-828. [DOI] [PubMed] [Google Scholar]
  • 32. Gaynanova I, Urbanek J, Punjabi NM. Corrections of equations on glycemic variability and quality of glycemic control. Diabetes Technol Ther. 2018;20(4):317. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33. Schlichtkrull J, Munck O, Jersild M. The M-value, an index of blood-sugar control in diabetics. Ugeskr Laeger. 1964;126:815-820. [PubMed] [Google Scholar]
  • 34. Hill NR, Hindmarsh PC, Stevens RJ, Stratton IM, Levy JC, Matthews DR. A method for assessing quality of control from glucose profiles. Diabet Med. 2017;24(7):753-758. [DOI] [PubMed] [Google Scholar]
  • 35. Service FJ, Molnar GD, Rosevear JW, Ackerman E, Gatewood LC, Taylor WF. Mean amplitude of glycemic excursions, a measure of diabetic instability. Diabetes. 1970;19(9):644-655. [DOI] [PubMed] [Google Scholar]
  • 36. Baghurst PA. Calculating the mean amplitude of glycemic excursion from continuous glucose monitoring data: an automated algorithm. Diabetes Technol Ther. 2011;13(3):296-302. [DOI] [PubMed] [Google Scholar]
  • 37. Kovatchev BP, Otto E, Cox D, Gonder-Frederick L, Clarke W. Evaluation of a new measure of blood glucose variability in diabetes. Diabetes Care. 2006;29(11):2433-2438. [DOI] [PubMed] [Google Scholar]
  • 38. Battelino T, Danne T, Bergenstal RM, et al. Clinical targets for continuous glucose monitoring data interpretation: recommendations from the international consensus on time in range. Diabetes Care. 2019;42(8):1593-1603. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39. Holm S. A simple sequentially rejective multiple test procedure. Scand J Stat. 1979;6(2):65-70. [Google Scholar]
  • 40. Broll S, Urbanek J, Buchanan D, et al. Interpreting blood GLUcose data with R package iglu. PLoS One. 2021;16(4):e0248560. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41. Rodbard D. Clinical interpretation of indices of quality of glycemic control and glycemic variability. Postgrad Med. 2011;123(4):107-118. [DOI] [PubMed] [Google Scholar]
  • 42. Moscardo V, Herrero P, Reddy M, et al. Assessment of glucose control metrics by discriminant ratio. Diabetes Technol Ther. 2020;22(10):719-726. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

sj-pdf-1-dst-10.1177_19322968211028909 – Supplemental material for A New Analysis Tool for Continuous Glucose Monitor Data

Supplemental material, sj-pdf-1-dst-10.1177_19322968211028909 for A New Analysis Tool for Continuous Glucose Monitor Data by Evan Olawsky, Yuan Zhang, Lynn E Eberly, Erika S Helgeson and Lisa S Chow in Journal of Diabetes Science and Technology


Articles from Journal of Diabetes Science and Technology are provided here courtesy of Diabetes Technology Society

RESOURCES