One of the most common questions researchers ask when designing a wearable sleep study is deceptively simple: what do you do about the nights a participant forgot to put the device on, or the stretch where a sensor quietly stopped recording? Every real-world deployment produces these gaps. The mistake is treating them as a nuisance to be deleted rather than as a signal to be modeled. In sleep research, the nights that go missing are rarely a random sample of all nights, and how you handle them can move your headline estimates more than the intervention you are studying.
This post walks through the mechanism of non-wear, why sleep missingness is usually the hardest kind to handle, how to define a valid night, which analysis methods hold up, and how to report all of it. Throughout, the practical thread is that robust handling starts at the raw signal, which is why device and SDK choices made at the design stage constrain everything you can do later.
Detecting non-wear starts with the raw signal
Non-wear detection algorithms fall into two families. Count-based methods, such as the Troiano and Choi algorithms, infer non-wear from long runs of consecutive zero activity counts produced by a device’s proprietary processing. Raw-acceleration methods, exemplified by the van Hees approach implemented in the open-source GGIR package, work directly on the raw triaxial signal.
The physical basis is intuitive. When a device is off the wrist it sits still, so its raw acceleration shows near-zero variance and a near-constant orientation relative to gravity. When it is worn, even a sleeping wrist generates micro-movements and small changes in gravitational angle. The van Hees algorithm operationalizes this by flagging a window as non-wear when, for at least two of the three axes, the standard deviation falls below roughly 13 mg (0.013 g) and the value range falls below roughly 50 mg (0.050 g). Later refinements evaluate a 60-minute window on 15-minute sliding blocks and add a second stage that tests the plausibility of short wear periods bordered by non-wear, reducing the misclassification of quiet sedentary time. The Choi algorithm improved on Troiano within the count-based family by requiring genuinely artifact-free windows, cutting the tendency to label sedentary behavior as non-wear.
Head-to-head evaluations favor the raw approach. Using two accelerometers plus ECG to build a gold-standard label set, one study found the raw van Hees algorithm outperformed every epoch and count-based method tested, with Choi moderate and older count-based approaches poor. A later deep convolutional network trained on raw data pushed performance further, reaching an F1 score near 0.998.For sleep specifically, the GGIR heuristic detects the sleep period time window from the distribution of change in the z-axis arm angle, which allows diary-free scoring in large cohorts. Validated against sleep diaries in 3,752 Whitehall II participants, the detected window differed from diary by only about 10.9 minutes in men and 2.9 minutes in women.
All of this depends on having the raw triaxial stream in the first place. This is where device architecture becomes a research design decision rather than a procurement detail. Hardware SDKs increasingly expose sample-level data: the Garmin Health Companion SDK streams raw accelerometry along with beat-to-beat intervals and respiration, and the Apple and Samsung sensor SDKs similarly provide raw accelerometer and photoplethysmography streams. Processed-output APIs take a different design path. The Oura Ring API, for instance, returns daily sleep, readiness, and activity summaries plus time-series heart rate, but does not expose the raw accelerometer stream. This is a structural distinction, not a quality judgment. Oura is a capable sleep and recovery platform, but its API design means a researcher cannot run an independent non-wear algorithm on its data and must instead rely on the vendor’s own internal definition of a recorded night. When independent, auditable non-wear detection is a study requirement, raw-signal access through a hardware SDK or a research-grade logger is the enabling condition.
Why missing sleep nights are rarely random
The standard framework for missing data, due to Rubin, distinguishes three mechanisms. Data are Missing Completely At Random (MCAR) when missingness is unrelated to any observed or unobserved value, as with a random hardware fault. Data are Missing At Random (MAR) when missingness depends only on observed variables, such as day of week. Data are Missing Not At Random (MNAR) when missingness depends on the very value that is missing, for example when a participant removes the device precisely on nights of poor, short, or fragmented sleep, or during illness, travel, or intoxication.
This taxonomy matters because it determines which methods are valid. The uncomfortable reality in sleep research is that non-wear repeatedly tests as not MCAR and often MNAR. A depression actigraphy study argued explicitly that participant non-wear may coincide with periods of relapse, meaning the missing nights are systematically different from the observed ones, and therefore modeled missingness as a predictor rather than a nuisance.The consequence for analysis is direct. If poor-sleep nights are preferentially missing, then simply dropping incomplete records inflates your estimated mean sleep duration and efficiency while shrinking your estimated night-to-night variability, which are often the exact quantities of clinical interest.
Defining a valid night before you collect data
There is no universal threshold for how many nights constitute a stable estimate, because the answer depends on the metric. Averages stabilize faster than variability. In a large consumer-tracker study of 107,144 nights from 1,041 working adults, at least 5 nights were needed for a “good” estimate of mean weekly total sleep time and 10 nights for a “very good” monthly estimate, whereas capturing night-to-night variability across a one-month window required 11 to 18 nights.Actigraphy work in adults found that sleep efficiency stabilized around 5 nights while total sleep time needed more than 7.
Two design consequences follow. First, set your minimum-valid-night rule a priori and tie it to your primary outcome, not to whatever happens to survive data collection. Second, respect day type. Weekend sleep timing differs systematically from weekdays, and weekend nights are also more likely to be missing, so a valid-night rule intended to support variability or social-jetlag metrics should require adequate coverage of both weeknights and weekend nights. Consensus guidance from the Society of Behavioral Sleep Medicine recommends collecting actigraphy alongside sleep diaries for a minimum of 7, and preferably 14, days precisely to capture these patterns and to flag non-wear segments.
Choosing an analysis method that holds up
Once you know your data will contain missing nights, the analysis method is the next decision. The methods that feel simplest are the ones most likely to mislead you.
Complete-case analysis, which deletes any record with a missing night, is unbiased only under MCAR. Given that sleep non-wear is usually MNAR, it is the highest-risk default, yet an audit of 77 randomized trials in leading medical journals found complete-case analysis was the single most common approach and that only about a third of trials reported any sensitivity analysis. Mean imputation and last-observation-carried-forward are similarly deprecated: the former shrinks variance and distorts covariance structure, the latter assumes no change over time and can bias effects in either direction. Modern missing-data authorities no longer recommend either.
The workhorses for longitudinal sleep data are methods that use all available person-nights and are valid under MAR. Linear and generalized mixed-effects models directly model the nesting of nights within participants and use every observed night without explicitly imputing anything. Multiple imputation generates several completed datasets by drawing plausible values from a predictive model, analyzes each, and pools the results so that imputation uncertainty is correctly propagated; it benefits substantially from auxiliary variables such as day of week, prior nights, and weather. Full information maximum likelihood maximizes the likelihood of the observed data without imputing, is deterministic, and in simulation work estimates parameters and standard errors accurately in multilevel settings.
When the object of interest is the rest-activity time series itself, neural approaches can impute gaps directly. The SOMNI model was built for exactly this real-world setting and imputes actigraphy gaps of up to 24 hours; on long datasets both individual and pooled models achieved an AUC above 0.86, and on short datasets only the pooled cross-participant model stayed accurate, which underscores the value of borrowing strength across participants when any single person’s history is short. For circadian summary metrics, a benchmark on UK Biobank data found that median time-of-day imputation preserved interdaily stability within 0.05 units for gaps up to 24 hours, while naive linear interpolation degraded quickly beyond a few hours.
No MAR-based method can recover information about systematically missing bad-sleep nights, so a pre-specified MNAR sensitivity analysis is not optional. The standard tools are pattern-mixture models, often implemented as delta-adjusted multiple imputation, and selection models. A wearable-specific framework formalizes this for accelerometer trials: it treats partially observed days as right-censored rather than discarding them, imputes at the day level with chained equations using auxiliary variables, and then specifies MNAR sensitivity through a delta adjustment applied to the imputed values.The gap between best and common practice remains wide; a review of mobile-health trials found that none of the studies examined conducted any MNAR sensitivity analysis at all.

Prevention beats correction
Every handling method is a way of making the best of data you did not collect. The higher-leverage work happens before and during the study. Streaming data server-side, for example through a raw-capable SDK, lets study staff see wear gaps within a day rather than at the end of the protocol, so they can intervene while it still matters. Real-time non-wear alerts can fire when raw variance indicates the device has been off the wrist beyond a threshold. Just-in-time adaptive interventions can deliver tailored reminders at opportune moments, and wear-time compliance is a standard feasibility outcome in that literature. Simpler protocol choices help too: favor the wrist for overnight compliance, schedule charging during a fixed daytime window rather than overnight, set a realistic 7 to 14 day wear period to buffer expected loss, and collect the auxiliary variables that both make the MAR assumption more defensible and strengthen any imputation you later perform.
Report the whole chain
Missing-data reporting in this field has historically been thin, which makes explicit documentation a differentiator. CONSORT requires accounting for all participants and losses, and STROBE requires observational studies to explain how missing data were addressed. For biometric monitoring specifically, the Digital Medicine Society’s V3 framework, extended to V3+ in 2024, separates verification, analytical validation, and clinical validation; the analytical validation layer is where the non-wear and sleep-scoring algorithms and their measured error belong.
A publishable account should state the device, sampling rate, and wear location; the SDK or API used and whether raw or processed data were analyzed; the non-wear algorithm with its exact thresholds and window; the sleep-scoring algorithm and its validated error; the valid-night definition and minimum-nights rule with justification; the amount and pattern of missingness, broken down by day of week; the assessment of the missingness mechanism; the primary analysis method; and the pre-specified MNAR sensitivity analysis with its results.
A staged decision framework
At the design stage, prefer devices and SDKs that expose raw accelerometry when independent non-wear verification matters, and if you use a processed-output API, pre-register that you will rely on the vendor’s gap definition and document the limitation. Pre-specify the non-wear algorithm and the valid-night rule, starting from at least 5 nights for a good average estimate and 11 to 18 for variability, with adequate weekday and weekend coverage. Collect auxiliary data and build in prevention through dashboards, alerts, and reminders.
At the analysis stage, do not default to complete-case, mean imputation, or last-observation-carried-forward. Use a mixed-effects model on all available person-nights as your primary method, or multiple imputation or full information maximum likelihood with auxiliary variables, imputing in a way that respects day type. Assess the mechanism, then run a pre-specified MNAR sensitivity analysis and report how much your conclusions move.
At the reporting stage, document the full chain against CONSORT or STROBE and place the non-wear and sleep algorithms within the DiMe V3 or V3+ analytical validation layer.
A few thresholds shift these recommendations. If a formal assessment supports MCAR and missingness is below 5 percent, complete-case analysis is defensible. If missingness is well predicted by observed variables, mixed models, multiple imputation, or full information maximum likelihood suffice without heavy MNAR concern. But once missingness climbs above 20 to 30 percent, or becomes strongly differential between study arms, the MNAR sensitivity analysis becomes decision-critical and no single method should be trusted on its own.
The common thread is that good handling of missing nights is enabled long before the statistics. Access to the raw signal is what lets you detect non-wear independently, verify a night rather than accept a vendor’s label, and defend your analytic choices to reviewers. That is the methodological reason Centralive builds on raw-signal access through hardware SDKs and open-source processing libraries: it keeps the decisions about what counts as a valid night, and how to treat the ones that go missing, in the researcher’s hands.
References
- Choi L, Liu Z, Matthews CE, Buchowski MS. Validation of accelerometer wear and nonwear time classification algorithm. Med Sci Sports Exerc. 2011;43(2):357-364. DOI: 10.1249/MSS.0b013e3181ed61a3
- van Hees VT, Renstrom F, Wright A, et al. Estimation of daily energy expenditure in pregnant and non-pregnant women using a wrist-worn tri-axial accelerometer. PLoS ONE. 2011;6(7):e22922. DOI: 10.1371/journal.pone.0022922
- van Hees VT, Gorzelniak L, Dean Leon EC, et al. Separating movement and gravity components in an acceleration signal and implications for the assessment of human daily physical activity. PLoS ONE. 2013;8(4):e61691. DOI: 10.1371/journal.pone.0061691
- Migueles JH, Rowlands AV, Huber F, Sabia S, van Hees VT. GGIR: a research community-driven open source R package for generating physical activity and sleep outcomes from multi-day raw accelerometer data. J Meas Phys Behav. 2019;2(3):188-196. DOI: 10.1123/jmpb.2018-0063
- Syed S, Morseth B, Hopstock LA, Horsch A. Evaluating the performance of raw and epoch non-wear algorithms using multiple accelerometers and electrocardiogram recordings. Sci Rep. 2020;10:5866. DOI: 10.1038/s41598-020-62821-2
- Syed S, Morseth B, Hopstock LA, Horsch A. A novel algorithm to detect non-wear time from raw accelerometer data using deep convolutional neural networks. Sci Rep. 2021;11:8832. DOI: 10.1038/s41598-021-87757-z
- van Hees VT, Sabia S, Jones SE, et al. Estimating sleep parameters using an accelerometer without sleep diary. Sci Rep. 2018;8:12975. DOI: 10.1038/s41598-018-31266-z
- Zhang Y, Folarin AA, Sun S, et al. Relapse in depression and participant non-wear in wrist-worn actigraphy. Sci Rep. 2023;13. (Verify author list and article number before publication.)
- Aili K, Astrom-Paulsson S, Stoetzer U, Svartengren M, Hillert L. Reliability of actigraphy and subjective sleep measurements in adults: the design of sleep assessments. J Clin Sleep Med. 2017;13(1):39-47. DOI: 10.5664/jcsm.6384
- Lau T, Ong JL, Ng BKL, et al. Minimum number of nights for reliable estimation of habitual sleep using a consumer sleep tracker. SLEEP Advances. 2022;3(1):zpac026. DOI: 10.1093/sleepadv/zpac026 (Verify full author list before publication.)
- Ancoli-Israel S, Martin JL, Blackwell T, et al. The SBSM guide to actigraphy monitoring: clinical and research applications. Behav Sleep Med. 2015;13(sup1):S4-S38. DOI: 10.1080/15402002.2015.1046356
- Lee MP, Hoang K, Park S, et al. Imputing missing sleep data from wearables with neural networks in real-world settings. SLEEP. 2024;47(1):zsad266. DOI: 10.1093/sleep/zsad266
- Weed L, Lok R, Chawra D, Zeitzer J. The impact of missing data and imputation methods on the analysis of 24-hour activity patterns. Clocks & Sleep. 2022;4(4):497-507. DOI: 10.3390/clockssleep4040039
- Tackney MS, Cook DG, Stahl D, Ismail K, Williamson E, Carpenter J. A framework for handling missing accelerometer outcome data in trials. Trials. 2021;22:379. DOI: 10.1186/s13063-021-05284-8
- Goldberg SB, Bolt DM, Davidson RJ. Data missing not at random in mobile health research. J Med Internet Res. 2021;23(6):e26749. DOI: 10.2196/26749 (Verify author list before publication.)
- Goldsack JC, Coravos A, Bakker JP, et al. Verification, analytical validation, and clinical validation (V3): the foundation of determining fit-for-purpose for biometric monitoring technologies (BioMeTs). npj Digit Med. 2020;3:55. DOI: 10.1038/s41746-020-0260-4
- Hardeman W, Houghton J, Lane K, Jones A, Naughton F. A systematic review of just-in-time adaptive interventions (JITAIs) to promote physical activity. Int J Behav Nutr Phys Act. 2019;16:31. DOI: 10.1186/s12966-019-0792-7
- Bell ML, Fiero M, Horton NJ, Hsu CH. Handling missing data in RCTs: a review of the top medical journals. BMC Med Res Methodol. 2014;14:118. DOI: 10.1186/1471-2288-14-118
Sign up for the Centralive Newsletter: https://newsletter.centralive.health/signup



