GlucoseIQ

Metrics Reference

Metric contracts, units, implementation references, and citations in GlucoseIQ.

Each metric names the publication or reference implementation behind its contract when one applies. Follow the cited source for method details and limitations.

Time in ranges

FunctionWhat it computesSource
calculateEnhancedTIR5-range TIR (very low / low / in-range / high / very high) with consensus target assessmentBattelino 2019
calculatePregnancyTIRPregnancy TIR (63–140 mg/dL)ADA Standards of Care
calculateTITRTime in Tight Range (70–140); target assessment uses the library's configurable 50% defaultProject default
detectEpisodes≥15-min hypo/hyper events with level, duration, nadir/peakDanne 2017; Battelino 2019

Averages & estimation

FunctionWhat it computesSource
estimateGMIGlucose Management Indicator from mean glucoseBergenstal 2018
estimateA1CFromAverage / estimateAvgGlucoseFromA1CA1C ⇄ eAGNathan 2008
calculateHOMAIRInsulin resistanceMatthews 1985

Variability & risk

FunctionWhat it computesSource
glucoseStandardDeviation / glucoseCoefficientOfVariationSD, CV%ADA 2019
glucoseMAGEMean Amplitude of Glycemic ExcursionsService 1970
glucoseLBGI / glucoseHBGILow/High Blood Glucose IndexKovatchev 2006
calculateADRRAverage Daily Risk RangeKovatchev 2006
calculateGRADEGlycemic Risk Assessment Diabetes EquationHill 2007
calculateGRIGlycemia Risk Index with A–E zonesKlonoff 2023
calculateJIndexComposite mean + variabilityWojcicki 1995
calculateMODDMean Of Daily DifferencesService 1980
calculateCONGAContinuous Overall Net Glycemic ActionMcDonnell 2005
glucoseMValueSchlichtkrull M-value (with/without W correction)Schlichtkrull 1965
calculateIGCRodbard hypo/hyper index + Index of Glycemic ControlRodbard 2009 (+ erratum)
calculateGVIPGSGVI + Patient Glycemic Status from unit-bearing GlucoseReading[] (Nightscout parity)Rodbard; Nightscout
glucoseMAGMean Absolute Glucose change per hourHermanides 2010
glucoseGVPGlycemic Variability PercentagePeyser 2018
calculateActivePercentTimestamp-slot coverage estimate (not proof of sensor wear)Danne 2017
calculateAGPMetricsMean, SD, CV, LBGI/HBGI, ADRR, GRADE, GRI, J-index, MODD, CONGA, active percent, and reading countConvenience aggregate

Series & events

FunctionWhat it computes
buildAGPProfileAGP-style time-of-day percentile-band series (5/25/50/75/95)
analyzeMealResponseBaseline, peak, delta, time-to-peak, return-to-baseline, iAUC
glucoseAUC / incrementalAUCTrapezoidal AUC; Wolever 4-case iAUC above baseline
computeGlucoseTrendRate-of-change + trend classification (Dexcom-style thresholds)
detectGaps / splitDayNight / alignToGridSensor gaps, nocturnal split, uniform-grid resampling
aggregateCohortPopulation distributions of TIR/GMI/CV/mean across patients

Unit contracts

Reading-based APIs such as calculateADRR, calculateGVIPGS, glucoseMAG, and glucoseGVP inspect the unit on every GlucoseReading and can normalize a mixed-unit series. calculateGVIPGS therefore takes unit-bearing readings, not a numeric array plus a unit option.

Numeric-array APIs require one homogeneous unit. glucoseLBGI, glucoseHBGI, and calculateJIndex take the unit as a positional argument; calculateGRADE takes it as the fourth positional argument; and glucoseMValue and calculateIGC take it in their options. glucoseMAGE operates on one homogeneous numeric scale and has no unit option. Always follow the individual signature before removing unit metadata.

Glucose IQ score

glucoseIQScore is a project-defined, non-diagnostic wellness heuristic derived from GRI. It is not a validated clinical score and must not be used for diagnosis or treatment decisions.

On this page