Calculating the mean amplitude of glycemic excursion from continuous glucose monitoring data: an automated algorithm.

BACKGROUND Glycemic variability is currently under scrutiny as a possible predictor of the complications of diabetes. The manual process for estimating a now classical measure of glycemic variability, the mean amplitude of glycemic excursion (MAGE), is both tedious and prone to error, and there is a special need for an automated method to calculate the MAGE from continuous glucose monitoring (CGM) data. METHODS An automated algorithm for identifying the peaks and nadirs corresponding to the glycemic excursions required for the MAGE calculation has been developed. The algorithm takes a column of timed glucose measurements and generates a plot joining the peaks and nadirs required for estimating the MAGE. It returns estimates of the MAGE for both upward and downward excursions, together with several other indices of glycemic variability. RESULTS Details of the application of the algorithm to CGM data collected over a 48-h period are provided, together with graphical illustrations of the intermediate stages in identifying the peaks and nadirs required for the MAGE. Application of the algorithm to 104 CGM datasets (92 from children with diabetes and 12 from controls) generated plots that, on visual inspection, were all found to have identified the peaks, nadirs, and excursions correctly. CONCLUSIONS The proposed algorithm eliminates the tedium and/or errors of manually identifying and measuring countable excursions in CGM data in order to estimate the MAGE. It can also be used to calculate the MAGE from "sparse" blood glucose measurements, such as those collected in home blood glucose monitoring.