Sleep Tracking: Can Nightly app replace a professional medical equipment?
Background. The newly emerged trend of quantified self is gaining popularity. With the help of mobile computing and wearable technologies, the amount of data available is tremendous. If the data is trustworthy, it can be helpful with diagnosing various health problems. One of the validated and widely accepted methods to gather data related to body movement is actigraphy. It uses an actigraph, a device similar to a wristwatch, to monitor and record the data of patient's activities. Nevertheless, a medical grade actigraph is a relatively expensive device. Methods. We performed a study to compare the actigraphy with an iOS smartphone application - Nightly. The study was conducted in a polysomnography (PSG) laboratory at the Institute of Psychiatry and Neurology in Warsaw. During the study, a smartphone with the Nightly application was placed in a bed's corner, near the pillow. Simultaneously, a patient wearing an actigraph on his non-dominant hand while undergoing a standard PSG. Methods. A patient was wearing an actigraph on his non-dominant hand. A smartphone with the Nightly application was placed in a bed's corner, near the pillow. The data from actigraph were sampled with 1Hz frequency. Each sample was one non-negative integer value representing proprietary activity counts. The data from the Nightly application was sampled with 2Hz frequency. Each sample consisted of three real values representing the current accelerations in the direction of the accelerometer axes. For each axis, a moving average with a 10-second window was calculated. Samples that were less than four standard deviations away from the calculated average were considered measurement noise. Then, each signal was resampled to 1Hz frequency by summing pairs of samples corresponding to the same actigraph sample. Finally, three signals were summed together to obtain one signal that can be compared to actigraphy. Results. In the first night, 69.6% p<0.001 of activity episodes detected by the actigraph were also detected by Nightly application in the same second. With 1 second of tolerance 80.1% p<0.001 of activity episodes were detected and with 2 seconds of tolerance detectability increased to 86.9% p<0.001. In the second night, the percentages of detected activity episodes were: without tolerance 75,2%, p<0.001; 1 second of tolerance 87,3%, p<0.001; 2 seconds of tolerance 92,9%, p<0.001. Direct comparison of activity levels is not meaningful, due to different placement of analyzed sensors. Conclusion. Nightly application can be reliably used as a cheap replacement of an actigraph. The results show that it is possible to use a smartphone to monitor patient's behavior during his sleep over long periods of time. It can also be used as an inexpensive method of estimating patient's structure of sleep.