Adjusts a raw baseline estimate according to global sleep-period glucose metrics (median, nadir, maximum), applying diabetic-status-dependent tolerances.
Arguments
- baseline
A baseline list as returned by
compute_baseline().- sleep_stats
A list with elements
median,nadir,maxfor the sleep period.- diabetic
Logical, whether the participant has diabetes. Diabetic participants use a tolerance of ±10 mg/dL and an upper cap of 180 mg/dL; non-diabetic participants use ±5 mg/dL and no cap.