glucopy.Gframe.qscore#

Gframe.qscore(slack: int = 0)[source]#

Calculates the Q-Score.

Qscore=8+X¯7.81.7+Range7.52.9+tG<3.90.62.9+tG>8.96.25.7+MODD1.80.9
  • X¯ is the sample mean (glucopy.Gframe.mean())

  • Range is the mean of the differences between the maximum and minimum glucose for each day.

  • tG<3.9 is the mean time [h] spent under 3.9 mmol/L in each day.

  • tG>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