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

Diabetes Technol Ther. 2011 Mar;13(3):296-302. doi: 10.1089/dia.2010.0090. Epub 2011 Feb 3.


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.

MeSH terms

  • Algorithms*
  • Blood Glucose / analysis*
  • Blood Glucose Self-Monitoring / methods*
  • Child
  • Data Interpretation, Statistical*
  • Diabetes Mellitus / blood*
  • Female
  • Humans
  • Male


  • Blood Glucose