glucopy.Gframe.qscore#
- Gframe.qscore(slack: int = 0)[source]#
Calculates the Q-Score.
\[Q{-}score = 8 + \frac{\bar X -7.8}{1.7} + \frac{Range - 7.5}{2.9} + \frac{t_{G<3.9} - 0.6}{2.9} + \frac{t_{G>8.9} - 6.2}{5.7} + \frac{MODD - 1.8}{0.9}\]\(\bar X\) is the sample mean (
glucopy.Gframe.mean()
)\(Range\) is the mean of the differences between the maximum and minimum glucose for each day.
\(t_{G<3.9}\) is the mean time [h] spent under 3.9 mmol/L in each day.
\(t_{G>8.9}\) is the mean time [h] spent over 8.9 mmol/L in each day.
\(MODD\) is the Mean of Daily Differences (
glucopy.Gframe.modd()
).
- Parameters:
slack (int, default 0) – Maximum number of minutes that the given time can differ from the actual time in the data in the calculation of
glucopy.Gframe.modd()
.- Returns:
qscore – Q-Score.
- Return type:
float
Examples
Calculating the Q-Score with a 5 minutes slack for MODD:
In [1]: import glucopy as gp In [2]: gf = gp.data('prueba_1') In [3]: gf.qscore(slack=5) Out[3]: 13.717336818929455