Identifies days containing implausible sleep periods by detecting sequences of heart rate issues that immediate follow sleep runs. A sleep period is considered implausible when a sufficiently long run of HR-flagged "awake" minutes immediate follows a sleep run that contained no HR issues, suggesting the device may have been have been removed or malfunctioned during what was recorded as sleep.
Arguments
- dt
tbl. Data frame with
participant_id,dtt,is_slp,hrate_no, andhrate_repeat_actvcolumns. This should be the output ofidentify_hr_exclusions()or 'identify_hr_recovery()'.- min_minutes
numeric, positive whole number. Minimum number of consecutive HR-flagged "awake" minutes required to flag an implausible sleep period.
- epoch_seconds
numeric, positive whole number. Duration of each epoch in seconds.