Skip to contents

Calculates the participant-level day-to-day standard deviation of the timing of the first post-wake glucose peak across valid analyzed cycles. Lower values indicate greater temporal regularity; higher values indicate greater day-to-day dispersion.

Usage

compute_fgptstd(cycles, min_days = 7)

Arguments

cycles

A list or data frame of validated sugaR_cycle objects (see validate_cycle()) for a single participant, each with a detected first post-wake peak time.

min_days

Integer, minimum number of valid days required to compute fGPTstd. Default 7, matching the manuscript's inclusion criterion for CGM data.

Value

A list with fgptstd (numeric, minutes) and n_days (integer, number of valid days contributing to the estimate). n_days is intended for use as a covariate in downstream regression models, as in the manuscript pipeline.