Skip to contents

Calculates Glucose Color Index (GCI) using 6DF disjoint linear summary of log-periodogram

Usage

# S3 method for `6DF_summary`
calculate_GCI(
  x,
  weights = default_weights(),
  means = c(long_slope = 0, long_midpoint = 0, int_slope = 0, int_midpoint = 0,
    short_slope = 0, short_midpoint = 0),
  stddevs = c(long_slope = 1, long_midpoint = 1, int_slope = 1, int_midpoint = 1,
    short_slope = 1, short_midpoint = 1),
  ...
)

Arguments

x,

Object of class "6DF_summary" containing 6-DF representation of log-periodogram

weights,

numeric vector of weights used to form the GCI linear combination

means,

numeric vector of mean values for the 6 degree of freedom approximation, subtracted away before calculation of GCI

stddevs,

numeric vector of standard deviations for each of the values within the 6 degree of freedom approximation, used for scaling before GCI calculation

...,

additional arguments/settings (not required here)

Value

gci, numeric containing the Glucose Color Index variability metric value

Details

Using weights, defaulting to those derived from analysis of the repeat CGM wears in the HYPNOS trial, generates the GCI as a weighted linear combination of a provided 6 degree of freedom disjoint piece-wise linear approximation of the log-periodogram.