R CMD check.computeENMOa() — ENMO-abs (van Hees et al. 2013), |r - 1| with r = sqrt(x^2+y^2+z^2), the
always-positive companion of computeENMO() (which truncates negatives to zero). ENMOa retains the
sub-1 g dips (deceleration / partial free-fall / a persistent calibration offset) that ENMO discards,
so ENMOa >= ENMO always. Completes the ENMO+MAD+ENMOa accelerometer movement triad. Validated
against GGIR::g.applymetrics ENMOa to machine precision (max |diff| ~2e-14 g, correlation 1.0) on
the real PAMAP2 hand-accelerometer signal (749 epochs).computeMAD() — mean amplitude deviation (Vähä-Ypyä et al. 2015), the gravity-robust
movement-intensity metric complementary to computeENMO(): per epoch, the mean absolute deviation
of the acceleration vector magnitude r = sqrt(x^2+y^2+z^2) about its epoch mean,
MAD = mean(|r - mean(r)|). MAD captures the variation of the magnitude within an epoch
(insensitive to a static orientation offset), whereas ENMO captures its elevation above 1 g.
Validated against GGIR::g.applymetrics MAD to machine precision (max |diff| ~5e-14 g,
correlation 1.0) on the real PAMAP2 hand-accelerometer signal (749 epochs).summarizeSleepStages() now matches stage labels case-insensitively, so the
default wake_levels = "Awake" / inbed_levels = "InBed" also match a vendor's
lowercase labels (e.g. Health Connect / Fitbit awake), which previously left
WASO at 0 and inflated sleep efficiency under the documented default call.summarizeSleepStages() generalises summarizeAppleSleep() to any vendor's
sleep-stage labels (via asleep_levels/wake_levels/stage_cols), so Fitbit
(wake/light/deep/rem) and other wearables reuse the same per-night
metrics. summarizeAppleSleep() is now a thin wrapper (unchanged behaviour).Wrist sleep and blood-oxygen analysis (Apple Watch and research actigraphy).
summarizeAppleSleep() turns the Apple Watch sleep STAGES (from an Apple Health
export) into per-night clinical metrics: time in bed, total sleep time, sleep
efficiency, WASO, onset latency, awakenings, and Core/Deep/REM minutes; nights
are split on a configurable gap.coleKripke() scores sleep/wake from per-minute activity counts (Cole-Kripke
1992, with Webster rescoring), and summarizeSleep() reduces a sleep/wake
series to the standard metrics.spo2Metrics() computes the oximetry indices from an SpO2 series -- mean,
nadir, time below 90% (T90/CT90) and an oxygen desaturation index (ODI) --
auto-scaling a 0-1 fraction to percent and using timestamps when supplied.adlToICF() now maps the remaining self-care activities (washing -> d510,
toileting -> d530, grooming -> d520), so the HAR pipeline is ICF-mapping-ready
for all d5 self-care given task-specific training data.Real-world upper-limb use (self-care performance).
upperLimbUse(): field-standard free-living arm-use metrics from bilateral
wrist accelerometry -- Use Ratio, Magnitude Ratio, Bilateral Magnitude, hours
of use per arm and a laterality index -- the sensor (performance) counterpart
to a clinic upper-limb capacity test, mapping to ICF d445 (hand and arm use),
the substrate of the d5 self-care activities.Sensor-based ADL activity recognition (HAR).
adlFeatures(): windowed time/frequency features for activity recognition
(per-axis and vector-magnitude statistics, signal-magnitude area, inter-axis
correlations, dominant frequency, spectral energy/entropy, jerk RMS).trainADL() / recognizeADL(): a dependency-free, model-agnostic
k-nearest-neighbours activity recogniser (swap in PhysioML ROCKET / a torch
model for a stronger engine).adlBudget() / adlToICF(): the recognised-activity time budget and its map
to ICF Activities & Participation d-codes (walking -> d450, stairs -> d455,
postures -> d415, eating -> d550, housework -> d640, ...) with the performance
qualifier -- answering "doing WHAT", complementing summarizeFreeLiving()'s
"how much / how intense". Validated on the real UCI HAR dataset.Free-living physical-behaviour summary and ICF linking.
summarizeFreeLiving(): day-level and person-level free-living metrics on top
of the ENMO / intensity primitives -- intensity time-use
(sedentary/light/MVPA), the Rowlands intensity gradient and MX metrics,
activity fragmentation (ASTP/SATP), the diurnal profile, WHO guideline
attainment and valid-wear-day handling.intensityGradient(), mxMetrics(), activityFragmentation(),
diurnalProfile(): the component metrics, exported standalone.freeLivingICF(): map the metrics to ICF Activities & Participation codes
stamped with the performance qualifier (real-world doing vs clinic capacity).computeENMO() is checked
against GGIR's ENMO (GGIR::g.applymetrics) on a real Axivity AX3 device
recording (from GGIRread), reproducing it to numerical precision; the GGIR
reference is bundled (tests/testthat/fixtures/wearable-ggir-reference.rds,
regenerated by data-raw/wearable_ggir_reference.R) and the raw file is read
from GGIRread at test time. autoCalibrateAccel() (van Hees et al. 2014) is
validated by ground-truth recovery of a known miscalibration from
sphere-covering still data and cross-checked against an independent algebraic
ellipsoid fit. GGIR/GGIRread added to Suggests.