Sleepless in Silico(n Valley)
Last updated: Mar 10, 2020
Sleep has been on a lot of folks’ minds recently in the self-quantification, behavioral-health, and medical communities. Self-trackers, researchers, and clinicians have employed devices from Fitbit and Oura to track and analyze an individual’s own sleep data.
I’ve been spending a lot of time on social media this past week (Twitter in particular)—literally losing sleep over how to grow my new blog. But despite being in a daze for much of Sunday (or perhaps extra-motivated by it), I was excited to catch up with my friend Dr. Logan Schneider later that evening at Stanford, where he’s a practicing sleep medicine physician.
With the help of a coffee hastily purchased earlier that day, I paid bleary-eyed but rapt attention as Logan gave me a brief overview of the key characteristics of sleep—what they are and how they’re defined, how they modulate outcomes like physical activity, and how they’re affected by some of those very same outcomes. We discussed important factors that affect sleep characteristics, like sleep duration and quality. These included the circadian rhythm, what you eat and drink (e.g., caffeine, alcohol), your body temperature, how you socialize, and weekdays versus weekends.
I wanted to know which questions surrounding sleep are of most interest clinically, but which can also be reliably answered through measurement or featurization of my Fitbit Charge 3 data. Ever the biostatistician, I also wanted to know which of these questions could directly benefit from the individual-specific causal inference methods I’ve been building (Daza 2018, 2019).
We’re now working on a paper to show how these counterfactual-based methods can help shed light on how to change sleep outcomes that are both clinically important and individual-specific. Because this will be a paper on statistical methods, we need to pick questions and collect data that are as straightforward as possible to define. (There will be plenty of complexity to explain about the analysis approach itself!)
We started by digging into how physical activity and sleep duration were related. How did each one affect the other for me in particular? How was my current sleep duration affected by past sleep duration and physical activity? How could we account for other factors that would’ve affected sleep duration, but that I didn’t measure (e.g., alcohol consumption)?
To further narrow down our questions, we asked which causal direction might be more feasible to address. That is, between physical activity and sleep duration, which would be easier to change—for me in particular, but also in general?
At the end of our chat, we decided we’d investigate how physical activity (e.g., measured by step count) affected my sleep duration, rather than vice-versa. The idea was that it might be easier for you to change your level of physical activity to affect how much sleep you get, rather than the other way around. For example, adding exercise to your daily routine (e.g., walking or cycling rather than driving) might be easier and more appealing than changing your bedtime or waking time.
Of course, the opposite could also be true—and we may very well change our minds over the next few weeks, depending on a formal literature review (along with feedback we get). We also want to see how physical activity may have affected my sleep quality.
Any thoughts? Please leave us your Comments below!⬇️