Natalie Daya Malek, Dan Wang, Sui Zhang, Michael Fang, Amelia Wallace, Scott Zeger, Elizabeth Selvin
In this article, we present the cgmstats package for the analysis of continuous glucose monitoring (CGM) data. The use of wearable CGMs is growing rapidly. The latest generation of CGM systems do not require fingerstick calibration, are minimally invasive, and are frequently used in research studies. CGM sensors are typically worn for up to 2 weeks and record interstitial glucose measurements every minute to every 15 minutes, depending on the sensor used. CGM systems generate hundreds of measurements per day and thousands of measurements in one person over a single wear. There is a need for tools that allow researchers to efficiently organize and summarize the wealth of data on glucose patterns produced by CGM systems. The cgmstats package generates CGM summary measures for data from a variety of CGM systems and allows the user to flexibly define ranges and generate data visualizations. In this article, we provide an overview of the cgmstats package and examples of its use. The cgmstats package supports rigorous and reproducible analyses of CGM data.