wadpac / GGIR

Code corresponding to R package GGIR
https://wadpac.github.io/GGIR/
Apache License 2.0
99 stars 62 forks source link

Option to impute missing sleeplog entries for sleep onset and wakeup time #1100

Closed vincentvanhees closed 6 months ago

vincentvanhees commented 7 months ago

Adds option to impute sleeplog entries for onset and wakeup time with the median of the values on the remaining days. Fixes #1088

Checklist before merging:

If NEW GGIR parameter(s) were added then these NEW parameter(s) are :

If GGIR parameter(s) were deprecated these parameter(s) are:

vincentvanhees commented 6 months ago

Thanks, I have been reflecting on this and think it is better to cancel this effort and instead expect GGIR users who want this to take care of sleep diary imputation outside GGIR.

Motivation: Accounting for weekday requires access to day of the week which the basic sleep log does not offer, which then forces us to retrieve this by matching with accelerometer data. This significantly increases code complexity. Further, I designed GGIR to intentionally exclude nights when sleep diary data is not complete, because there is no evidence that combining guiders (sleeplog and HDCZA) or imputing guiders truly provides meaningful estimates of sleep.