Overview of GGIR functionality and data processing
mainGGIR is an R package designed to process multi-day raw accelerometer data (expressed in gravitational units, 1 g) for research into physical activity, sleep, and circadian rhythms. While optimized for raw data, it also supports previous-generation accelerometer data (epoch-level data in brand-specific units).
Core Signal Processing Steps
- Raw Data Processing: Automatic calibration to gravity, detection of abnormally high values, imputation of raw-level time gaps (for specific brands), and calculation of orientation angles and average magnitude acceleration.
- Epoch-level Processing: Detection of non-wear periods and epoch-level imputation.
- Metric Calculation: Generation of data quality and summary metrics used to estimate physical activity, inactivity, sleep, and circadian rhythms.
Output Time Resolutions
GGIR provides data at several temporal granularities:
- Per recording: Typically one per participant ID.
- Calendar day: Defaulted to midnight borders.
- Night: A period centered around the main daily sleep period (defaulting to noon-to-noon or 6pm-to-6pm).
- Day segment: Defined via code (standardized) or a diary file (variable per recording/day).
- Waking-up windows: Defined from waking after main sleep to the next waking event, or from sleep onset to the next sleep onset.
- Epoch-level time series: User-defined epoch lengths (e.g., 5 seconds).