pgs | R Documentation |
The function mad produces PGS values in a tibble object.
pgs(data, dur_length = 20, end_length = 30)
data |
DataFrame object with column names "id", "time", and "gl". Should only be data for 1 subject. In case multiple subject ids are detected, a warning is produced and only 1st subject is used. |
dur_length |
Numeric value specifying the minimum duration in minutes to be considered an episode. Note dur_length should be a multiple of the data recording interval otherwise the function will round up to the nearest multiple. Default is 20 minutes to match the original PGS definition. |
end_length |
Numeric value specifying the minimum duration in minutes of improved glycemia for an episode to end. Default is 30 minutes to match original PGS definition. |
A tibble object with 1 row for each subject, a column for subject id and a column for GVP values is returned. NA glucose values are omitted from the calculation. Note that the duration thresholds for episodes are NOT the same as the episode_calculation defaults. The defaults chosen for PGS are those that match the original PGS paper definition, while the episode_calculation defaults match the consensus.
A tibble object with two columns: subject id and corresponding PGS value.
Elizabeth Chun
Hirsch et al. (2017): A Simple Composite Metric for the Assessment of Glycemic Status from Continuous Glucose Monitoring Data: Implications for Clinical Practice and the Artificial Pancreas Diabetes Technol Ther 19(S3) .S38-S48, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1089/dia.2017.0080")}.
episode_calculation()
data(example_data_1_subject)
pgs(example_data_1_subject)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.