Description
Sleep Duration Estimate Algorithm.
Description
Provides sleep duration estimates using a Pruned Dynamic Programming (PDP) algorithm that efficiently identifies change-points. PDP applied to physical activity data can identify transitions from wakefulness to sleep and vice versa. Baek, Jonggyu, Banker, Margaret, Jansen, Erica C., She, Xichen, Peterson, Karen E., Pitchford, E. Andrew, Song, Peter X. K. (2021) An Efficient Segmentation Algorithm to Estimate Sleep Duration from Actigraphy Data <doi:10.1007/s12561-021-09309-3>.
README.md
INSTRUCTIONS FOR USE (v0.2.2)
Import physical activity dataset into local environment
Check that activity count data (i.e., vector magnitude) is calculated and present in the physical activity dataset
Update the time variable formats and data types via the ChangeTimeVar function, ensuring that the format field matches the current time formatting
Perform any other pre-processing specific to the dataset
If using sleep diary data, repeat steps 1, 3, and 4 for sleep diary data
Run the SleepEstEachDay function for each subject while specifying preferred parameter values (refer to documentation for details)