agp_metrics: Calculate metrics for the Ambulatory Glucose Profile (AGP)

agp_metricsR Documentation

Calculate metrics for the Ambulatory Glucose Profile (AGP)

Description

The function agp_metrics runs the following functions and combines them into a tibble object: active_percent, mean_glu, gmi, cv_glu, below_percent, in_range_percent, above_percent.

Usage

agp_metrics(data, shinyformat = FALSE)

Arguments

data

DataFrame object with column names "id", "time", and "gl".

shinyformat

Logical indicating whether the output should be formatted for the single subject AGP page in shiny. Defaults to FALSE.

Details

The function uses recommended cutoffs of 54, 70, 180, and 250 mg/dL for calculation.

If shinyformat = FALSE (default), returns a tibble object with 1 row for each subject, and 12 columns: a column for subject id, a column for start date, a column for end date, a column for number of days, a column for active_percent, a column for Mean value, a column for gmi value, a column for cv value, a column for below_54 value, a column for below_70 value, a column for in_range_70_180 value, a column for above_180 value, a column for above_250 value. If shinyformat = TRUE, a tibble with 2 columns: metric and value, is returned. This output is used when generating the single subject AGP shiny page.

Value

By default, a tibble object with 1 row for each subject, and 13 columns is returned: a column for subject id, a column for start date, a column for end date, a column for number of days, a column for active_percent, a column for Mean value, a column for gmi value, a column for cv value, a column for below_54 value, a column for below_70 value, a column for in_range_70_180 value, a column for above_180 value, a column for above_250 value,

References

Johnson et al. (2019) Utilizing the Ambulatory Glucose Profile to Standardize and Implement Continuous Glucose Monitoring in Clinical Practice, Diabetes Technology and Therapeutics 21:S2 S2-17-S2-25, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1089/dia.2019.0034")}.

Examples

data(example_data_1_subject)
agp_metrics(example_data_1_subject)


iglu documentation built on Oct. 20, 2023, 5:07 p.m.