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
| Function | What it computes | Source |
|---|---|---|
calculateEnhancedTIR | 5-range TIR (very low / low / in-range / high / very high) with consensus target assessment | Battelino 2019 |
calculatePregnancyTIR | Pregnancy TIR (63–140 mg/dL) | ADA Standards of Care |
calculateTITR | Time in Tight Range (70–140); target assessment uses the library's configurable 50% default | Project default |
detectEpisodes | ≥15-min hypo/hyper events with level, duration, nadir/peak | Danne 2017; Battelino 2019 |
Averages & estimation
| Function | What it computes | Source |
|---|---|---|
estimateGMI | Glucose Management Indicator from mean glucose | Bergenstal 2018 |
estimateA1CFromAverage / estimateAvgGlucoseFromA1C | A1C ⇄ eAG | Nathan 2008 |
calculateHOMAIR | Insulin resistance | Matthews 1985 |
Variability & risk
| Function | What it computes | Source |
|---|---|---|
glucoseStandardDeviation / glucoseCoefficientOfVariation | SD, CV% | ADA 2019 |
glucoseMAGE | Mean Amplitude of Glycemic Excursions | Service 1970 |
glucoseLBGI / glucoseHBGI | Low/High Blood Glucose Index | Kovatchev 2006 |
calculateADRR | Average Daily Risk Range | Kovatchev 2006 |
calculateGRADE | Glycemic Risk Assessment Diabetes Equation | Hill 2007 |
calculateGRI | Glycemia Risk Index with A–E zones | Klonoff 2023 |
calculateJIndex | Composite mean + variability | Wojcicki 1995 |
calculateMODD | Mean Of Daily Differences | Service 1980 |
calculateCONGA | Continuous Overall Net Glycemic Action | McDonnell 2005 |
glucoseMValue | Schlichtkrull M-value (with/without W correction) | Schlichtkrull 1965 |
calculateIGC | Rodbard hypo/hyper index + Index of Glycemic Control | Rodbard 2009 (+ erratum) |
calculateGVIPGS | GVI + Patient Glycemic Status from unit-bearing GlucoseReading[] (Nightscout parity) | Rodbard; Nightscout |
glucoseMAG | Mean Absolute Glucose change per hour | Hermanides 2010 |
glucoseGVP | Glycemic Variability Percentage | Peyser 2018 |
calculateActivePercent | Timestamp-slot coverage estimate (not proof of sensor wear) | Danne 2017 |
calculateAGPMetrics | Mean, SD, CV, LBGI/HBGI, ADRR, GRADE, GRI, J-index, MODD, CONGA, active percent, and reading count | Convenience aggregate |
Series & events
| Function | What it computes |
|---|---|
buildAGPProfile | AGP-style time-of-day percentile-band series (5/25/50/75/95) |
analyzeMealResponse | Baseline, peak, delta, time-to-peak, return-to-baseline, iAUC |
glucoseAUC / incrementalAUC | Trapezoidal AUC; Wolever 4-case iAUC above baseline |
computeGlucoseTrend | Rate-of-change + trend classification (Dexcom-style thresholds) |
detectGaps / splitDayNight / alignToGrid | Sensor gaps, nocturnal split, uniform-grid resampling |
aggregateCohort | Population 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.