3. Time
Sleep“Quality”
How do we keep people healthy as they age?
Daytime fatigue?
Increased depressive symptoms?
Sleep-related anxiety
Referral to sleep
doctor
4. Time
Sleep“Quality”
How do we keep people healthy as they age?
Referral to sleep
doctor
Intervene here: PRECISION HEALTH
5. What is sleep “quality”?
(i.e., how well does your sleep lead to improvements in…)
(1) Waste clearance
(2) Memory consolidation
(3) Energy use
(4) Immune function
(5) Subjective impression
(6) Many, many others?
6. What are the objective correlates of sleep “quality”?
How can we measure these in a continuous,
unobtrusive manner to allow for a Precision Health
approach?
7. What are the objective correlates of subjective
sleep quality?
Community-dwelling older men (n=1024) and women
(n=459) [MrOS/SOF cohorts]
81 ± 4.6 (♂), 83 ± 3.3 (♀) years old
Mostly (~90%) Caucasian
Mostly (~80%) “good” or “excellent” self-reported health
• Single overnight, in-home, unattended PSG
• Post-PSG sleep questionnaire
8. Subjective sleep quality – post-PSG sleep diary
How deep was your sleep?
1 2 3 4 5
Light Deep
How restful was your sleep?
1 2 3 4 5
Restless Restful
9. Cohorts had expected sleep of an older adult
PSG Sleep Variables Men (n=1024) Women (n=459)
Apnea-hypopnea Index 12.7 ± 14.3 10.0 ± 12.4
Total sleep time 5.7h ± 78.2m 5.8h ± 77.1m
Wake after sleep onset (min) 123 ± 69.3 98.6 ± 66.5
Sleep efficiency (%) 73.9 ± 13.2 74.3 ± 13.2
Stage 1 (%) 12.4 ± 8.9 5.3 ± 3.8
Stage 2 (%) 61.6 ± 10.7 55.4 ± 12.3
Stage 3/4 (%) 6.7 ± 7.0 20.8 ± 12.5
REM (%) 19.3 ± 7.1 18.5 ± 7.2
REM latency (min) 94.0 ± 69.5 111 ± 82.6
S→W shifts per hour 6.1 ± 3.4 3.8 ± 2.0
Deep→Light shifts per hour 1.7 ± 1.4 3.7 ± 2.3
11. Model variables
PSG variables
Total sleep time
Wake after sleep onset
Sleep efficiency
%S1, %S2, %S3/4, %REM
REM latency
# sleep→wake shifts/hr
# deep→light shifts/her
Lights off/on time
Respiratory Distress Index
Self-reported sleep variables
Pittsburgh Sleep Quality Index
(continuous and split at 5)
Epworth Sleepiness Scale (split at 10)
Demographic and clinical variables
Education
Geriatric Depression Scale
Goldberg Anxiety Scale
Medication use (benzodiazepines,
antidepressants, “sleep”)
History of medical illness (diabetes, stroke,
heart disease)
Daily caffeine intake
Weekly alcohol intake
Smoking status
Self-reported health
Body mass index and waist circumference
Teng Modified Mini Mental State Exam (♂) or
Mini Mental State Exam (♀)
Socioeconomic status (♂)
Living alone (♀)
12. Analytic strategy – supervised machine learning
Least absolute shrinkage and selection operator (Lasso)
penalized regressions
variable selection and importance
10-fold cross-validation
penalizes overfitting
Random forests
rank importance by explanatory relevance
averages across 2000 decision trees
Kate Kaplan, PhD
13. Lasso Sleep Depth
(Light – Deep)
Sleep Restfulness
(Restless – Restful)
Men Women Men Women
SE SE SE SE
TST Sleep to Wake
Shifts
Site Site
Site PSQI TST Education
PSQI Site Deep to Light
Stage Shifts
GAS
PSQI Sleep to Wake
Shifts
Age
R²
11-17% (♂)
12-15% (♀)
15. What about qEEG?
Second cohort (SHHS)
3,173 men and women 39-90 years old
Same procedures as previous cohorts
Additional analyses:
• qEEG
• parsing by age
16. qEEG: Spectral analysis
Fast Fourier Transformation (FFT)
Separated by REM and NREM
Name Frequency
Slow <1 Hz
Delta 1-4 Hz
Theta 4-8 Hz
Alpha 8-12 Hz
Sigma 12-15 Hz
Beta 15-20
High-frequency
sigma
14-15 Hz
0 5 1510 20 25
Frequency (Hz)
0.01
0.1
1
10
100
Power(µv²)
NREM
REM
18. What does the PSG tell us about subjective
sleep quality?
No universal signal for subjective sleep quality in
standardly PSG-derived variables (including qEEG)
Subgroups responding to specific signals?
Hidden signals in the PSG?
24. What about accelerometry data?
• N=1403 health older men (MrOS)
• Single night standard sleep metrics
derived from accelerometry (SE, TST,
WASO)
• Compared to same “depth” and
“restfulness” as PSG
• Novel fPCA-derived shape analysis
• HR and HRV included
Afik Faerman
25. Accelerometry prediction of sleep quality
0 100 200 300
200400600800
PCA function 1 (Percentage of variability 31.1 )
argvals
Harmonic1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------------------------------------------------------------------------------------------
0 100 200 300
2006001000
PCA function 2 (Percentage of variability 13.9 )
argvals
Harmonic2
+
+++++++++
+
+
+
+
+
+
+
++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+
+
+
+
+
+
+
-
---------------------------------------------------------------------------------------------------------------------------
-
-
-
-
500700
PCA function 3 (Percentage of variability 12.6 )
armonic3
+++++++++++++++++++++++++++++++++++++++++++++++++
+ ++
++
++++++++++++++++++++++
+++ ++++
++
+++++++
----------------- ---
-
-
-
-
-
-
--------------
-
-
-
-
-
-
-
-
- ----------------------------------
400600
PCA function 4 (Percentage of variability 11.3 )
armonic4
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++
------------- ---------------------------------------------------------------------
Functional Principal
Component Analysis (fPCA)
• Reduces shapes to a
series of eigenvectors
Heart Rate Variability (HRV)
• Time domain measures
used
• N=1141
• Mean, SD, CV of NN
• Short- and long-term variability
from Poincare plot
• Short:long variability ratio
• Normalized low (0.04-0.15 Hz)
and high (0.15-0.4 Hz) f power
• Low:high power ratio
• Detrended Fluctuation Analysis
26. R² 12-14%
Depth Restfulness
Accelerometry+HRV prediction of sleep quality
Lasso SE, PSQI fPCA1, SE, PSQI
RF PSQI, SE, WASO,
fPCA1, bed time,
SOL, wake time,
fPCA4, waist
circumference
R² 6%
PSQI, SE, WASO,
fPCA1, 3MS, TST,
fPCA4, waist
circumference, SOL,
TIB, bed time, wake
time, fPCA5, site
Neither ACG or HRV predict subjective sleep quality in older men
27. Question 2: Can we record real-world
performance that is reflective of sleep quality in
an unobtrusive manner?
28. Data set: sleep quality for daytime performance
• Cohort: 32,000 users over 18 months
• US representative age, BMI, sleep; mostly male (93%)
• Opt-in to link Bing searches and Band data
• Performance: 75 million interaction tasks
• Microsoft Bing search engine
• Keystroke time in search bar
• Click time (adjusted for complexity and result number)
• Sleep: 3 million nights of sleep
• Microsoft Band
• Accelerometry
• “I’m awake” button
fa
fac
face
…
Δt(“c”) = 237ms
Δt(“e”) = 219ms
Tim Althoff, PhD
29. Real world performance
31% variation
0 6 12 18 24
Hours since midnight local time
200
210
220
230
240
250
260
270
280
Keystroketime(ms)
Worse (slow)
Better (fast)
Clock Time
30. Statistical Model
• Generalized Additive Model
• Intercept
• Keystroke (control for key pressed: “A”, “a”, “@”, …)
• Time of day (circadian rhythm)
• Time since wakeup (homeostatic sleep drive & sleep inertia)
• Parameter learning
• Fine-grained discretization functions (non-parametric)
• Least squares optimization
Keystroke time Residual
31. Model Estimates - Circadian
0 6 12 18 24
Hours since midnight local time
−10
0
10
20
30
40
50
Contributiontokeystroketime(ms)
0h 12h 24h
Time of day
Reactiontime
C
32. Model Estimates – Homeostasis and Inertia
0 4 8 12 16
Hours after wakeup
−35
−30
−25
−20
−15
−10
−5
0
5
10
Contributiontokeystroketime(ms)
0h 8h 16h
Time since wakeup
Reactiontime
HI 2h
2h
33. Impact of sleep timing
Difference (hrs) from
typical sleep timing
(midpoint)
-4 → -1 (wake early)
-1 → 1
1 → 4 (wake late)
0 4 8 12 16
190
200
210
220
230
240
250
260Keystroketime(ms)
Hours after wake time
34. Impact of chronotype
Lark (00:00-05:00)
Neither (05:00-07:00)
Owl (07:00-12:00)
00:00 06:00 12:00 18:00 24:00
190
200
210
220
230
240
250
260
270
280Keystroketime(ms)
Time of Day
Sleep midpoint
35. Impact of time in bed
0 4 8 12 16
190
200
210
220
230
240
250
260
Keystroketime(ms)
4→6
6→7
7→9
Time in bed (hours)
9→12
Hours after wake time
36. Impact of time in bed
4 5 6 7 8 9 10 11
Time in bed (hours)
−8
−6
−4
−2
0
2
4
6
8
Contributiontokeystroketime(ms)
37. Impact of weekday vs. weekend
0 4 8 12 16
Hours after wakeup
190
200
210
220
230
240
250
260
Keystroketime(ms)
Weekday
Weekend
0 4 8 12 16
Hours after wakeup
−0.06
−0.04
−0.02
0.00
0.02
0.04
0.06
0.08
Keystroketime(Z-score)
Weekday
Weekend
Raw Z-score Transform
38. Impact of poor sleep – how long does it take to
recover from poor sleep?
≥6 hours ≥6 hours ≥6 hours <6 hours <6 hours <6 hours
Two
consecutive
“good” nights
Two
consecutive
“bad” nights
One “good”,
one “bad”
night
39. Impact of poor sleep – how long does it take to
recover from poor sleep?
1 2 3 4 5 6 7
212
214
216
218
220
222
224
226
Keystroketime(ms)
Days after sleep pattern
Consecutive ‘bad’
One ‘good’/one ‘bad’
Consecutive ‘good’
40. Impact of poor sleep – societal impact
Examined 16 billion keystrokes across ~90% of all U.S. counties and
compared to published motor vehicle accident fatality rates
Average keystroke time is strongly predictive of accident fatality rate
across counties (ρ = 0.61; p « 10−10)
41. Summary: clinically-actionable data
• Neither PSG nor actigraphy data (with or without HR/HRV),
as currently interpreted, captures the subjective
phenomenon of sleep
• Search engine-based metadata (click/typing speed) can be
used as an unobtrusive measure of sleep quality vis-à-vis
daytime performance
• Objective correlates of sleep-related functions that can be
recorded continuous, unobtrusively, and in the real world
are needed
42. Acknowledgements
Objective correlates of subjective sleep quality
Kate Kaplan, PhD
Prajesh Hardas
Jason Hirshman
Afik Faerman
Population-scale performance monitoring
Tim Althoff, PhD
Eric Horvitz, MD PhD
Ryen White, PhD
45. Extra slides – click position and entropy
1 2 3 4 5 6 7 8
Click position
6
8
10
12
14
16
18
20
22
24
Clicktime(seconds)
46. Extra slides – network latency
0 6 12 18 24
Hours since midnight local time
0.0
0.2
0.4
0.6
0.8
1.0
Averagedifferenceinnetwork
latencybetweenrequests(ms)
San Bernardino County, CA
Riverside County, CA
Los Angeles County, CA
San Diego County, CA
Orange County, CA
Theoretical
Empirical
Bias ~0.2 ms,
Very small compared
to keystroke times
(~240 ms)
47. Extra slides – reasonability of MS Band sleep data
(10, 20] (20, 30] (30, 40] (40, 50] (50, 60] (60, 70]
Age
6.4
6.6
6.8
7.0
7.2
7.4
7.6
7.8
8.0
Timeinbed(hours)
Male
Female
48. Extra slides – reasonability of sample population
Dataset Statistics
Median age: 38
% female: 6.1%
Median time in bed: 7.26h
49. Extra slides – keystroke vs. click
0 6 12 18 24
Hours since midnight local time
200
210
220
230
240
250
260
270
280
Keystroketime(ms)
Clock Time
0 6 12 18 24
9.0
9.5
10.0
Clicktime(seconds)
Clock Time
50. Extra slides – MrOS/SOF Demographics
Variable
Men
(n = 1024)
Women
(n = 459)
Age, M ± SD 81.1 ± 4.6 82.9 ± 3.3
Race, No. (%)a
White 892 (87.1) 421 (91.7)
African American 40 (3.9) 38 (8.3)
Asian 48 (4.7) 0
Hispanic 28 (2.7) 0
Other 16 (1.6) 0
Education, No. (%)a
≤ 12 years 173 (16.9) 321 (69.9)
12-16 years 417 (40.7) 104 (22.7)
> 16 years 434 (42.4) 34 (7.4)
Health, No. (%)
Excellent 324 (31.7) 100 (21.8)
Good 540 (52.8) 253 (55.1)
Fair 142 (13.9) 96 (20.9)
Poor – Very Poor 18 (1.8) 10 (2.2)
Geriatric Depression Scale, M ± SD 1.8 ± 2.2 2.4 ± 2.7
Goldberg Anxiety Scale, M ± SD 0.74 ± 1.6 1.6 ± 2.4
Pittsburg Sleep Quality Index, M ± SD 5.5 ± 3.1 6.7 ± 3.8
Epworth Sleepiness Scale, M ± SD 7.0 ± 3.9 5.8 ± 3.7
Habitual Sleep Duration (hours), M ± SD 7.2 ± 1.2 6.9 ± 1.4
Body Mass Index, M ± SD 26.9 ± 3.8 27.7 ± 4.6
Waist Circumference (cm), M ± SD 101 ± 12.3 88.5 ± 12.5
Poor Sleep Quality, No. (%) 445 (44.0) 259 (56.4)
Variable
Men
(n = 1024)
Women
(n = 459)
Antidepressant Use, No. (%) 108 (10.5) 51 (11.1)
Benzodiazepine Use, No. (%) 39 (3.8) 37 (8.8)
Sleep Medication Use, No. (%) 142 (13.9) 81 (17.6)
Drinks Per Week, M ± SD 1.8 ± 1.7 1.0 ± 2.9
Caffeine Per Day (mg), M ± SD 246 ± 247 154 ± 155
Smoking Status, No. (%)
Current 13 (1.3) 4 (0.0)
Former 526 (51.4) 143 (34.0)
Never 484 (47.3) 274 (65.1)
Cerebrovascular History, No. (%) 135 (13.2) 64 (13.9)
Cardiovascular History, No. (%) 319 (31.4) 149 (32.5)
Diabetes, No. (%) 167 (16.3) 62 (13.5)
Mini-Mental State Exam -- 28.3 ± 1.6
Modified Mini-Mental State Exam 92.5 ± 6.3 --
Socioeconomic ladder (1-10), M ± SD a,b 7.2 ± 1.6 --
Currently living alone, No. (%)c -- 282 (61.4)
51. Extra slides – SHHS Demographics
Variable N=3,173
Age, M ± SD 62.73 ± 11.33
Sex, No. Female (%) 1,639 (51.65)
Race, No. (%)
White 2,702 (85.16)
African American 234 (7.37)
Hispanic 176 (5.55)
Other 61 (1.92)
Education, No. (%)
≤ 10 years 259 (8.16)
11-15 years 1588 (50.05)
16-20 years 1157 (36.46)
> 20 years 169 (5.33)
Health, No. (%)
Excellent 501 (15.79)
Very Good 1200 (37.82)
Good 1103 (34.76)
Fair 326 (10.27)
Poor 43 (1.36)
SF-36 Physical Health, M ± SD 47.88 ± 9.56
SF-36 Mental Health, M ± SD 53.33 ± 8.18
SF-36 Calm, M ± SD 2.78 ± 1.19
Self-Reported Stress 1.48 ± 0.74
Habitual Sleep Duration, hours 7.13 ± 1.15
Epworth Sleepiness Scale > 10, No. (%) 781 (24.61)
Waist Circumference, M ± SD 96.16 ± 13.64
Body Mass Index (BMI), M ± SD 27.95 ± 4.98
Usual alcohol intake per week, M ± SD 3.01 ± 5.36
Daily cups of caffeinated drinks, M ± SD 2.58 ± 2.58
Taking Benzodiazepines1, No. (%) 182 (5.74)
Taking Antidepressants1, No. (%) 218 (6.87)
Taking sleeping pills2, No. (%) 201 (6.33)
Variable N=3,173
Smoking Status, No. (%)
Never 1507 (47.49)
Former 1369 (43.15)
Current 297 (9.36)
History of Diabetes, No. (%) 217 (6.84)
History of Coronary Heart Disease, No. (%) 477 (15.03)
Marital Status, No. (%)
Married 2494 (78.60)
Widowed 256 (8.07)
Divorced or Separated 311 (9.80)
Never Married 99 (3.12)
Total Sleep Time, M ± SD 357.04 ± 61.95
Wake After Sleep Onset, M ± SD 57.69 ± 40.91
Sleep Efficiency, M ± SD 81.80 ± 10.16
Stage 1 Percent, M ± SD 5.41 ± 3.94
Stage 2 Percent, M ± SD 56.67 ± 11.76
Stage 3/4 Percent, M ± SD 18.16 ± 11.96
REM Percent, M ± SD 19.75 ± 6.16
REM Latency, M ± SD 88.33 ± 55.42
Sleep to Wake Shifts per hour, M ± SD 3.81 ± 1.83
Deep to Light Stage Shifts per hour, M ±
SD
2.99 ± 1.90
Stage 2 to Stage 1 Shifts per hour, M ± SD 0.03 ± 0.08
Respiratory Disturbance Index, M ± SD 8.30 ± 12.05
Variable N=3,173
Alpha NREM, M ± SD 3.89 ± 1.70
Alpha REM, M ± SD 2.24 ± 1.74
Beta NREM, M ± SD 0.69 ± 1.55
Beta REM, M ± SD 0.69 ± 1.66
Delta NREM, M ± SD 30.90 ± 1.58
Delta REM, M ± SD 10.23 ± 1.55
High-frequency Sigma NREM, M ± SD 1.78 ± 1.70
High-frequency Sigma REM, M ± SD 1.02 ± 1.66
Sigma NREM, M ± SD 2.29 ± 1.70
Sigma REM, M ± SD 1.26 ± 1.70
Slow Oscillations NREM, M ± SD 102.33 ± 1.78
Slow Oscillations REM, M ± SD 29.51 ± 1.70
Theta NREM, M ± SD 7.24 ± 1.62
Theta REM, M ± SD 3.98 ± 1.66
Editor's Notes
30min? Q/A?
Sleep percent out of 100%=all sleep time (no W)
sleep efficiency = total sleep time / total time in bed
AHI= respiratory events with oxygen desaturation ≥ 4% per hour
PLM-A and PSG-determined SOL not included in either cohort due to measure unreliability and missing data (>20%), respectively, in MrOS.
Education (grouped as <12 years, 12-16 years, >16 years),
Smoking status (current, former, never)
Self-reported ratings of health on a 1-5 Likert-type scale (very good to very poor, with poor and very poor collapsed to improve variable distribution)
Socioeconomic status relative to their community (1-10 ladder)
Lasso penalized regression is a multivariable regression method useful for predicting an outcome in the presence of a sizeable number of predictor variables. Unlike ordinary least squares regression, lasso regression penalizes models that have many large coefficients under the assumption that such models are likely to be overfit. Lasso regression is useful for handling correlated predictor variables and for performing variable selection as the penalty imposed shrinks some variable coefficients to zero. In lasso penalized regression, the size of the penalty coefficient (λ) is chosen to minimize model predictive error using ten-fold cross-validation. This optimal λ is subsequently used to perform variable selection by shrinking all coefficients (some to zero). To make the model more robust to randomness in the cross-validation procedure, we used the stringent one standard error from the lambda minimum as the penalty in all lasso models. To estimate a ranking of variable importance, the maximal value of lambda at which the variable first entered the model was determined. Separate lasso regression models were evaluated for each of our measures of sleep quality (Sleep Depth and Restfulness) in both men and women.
Random forests, to rank the importance of predictor variables by explanatory relevance. A random forest model is a regression-based procedure averaging across a series of traditional decision trees (in the present sample, 2000) and using a subset of predictors (in the present sample, 13) to grow an individual tree, which has the effect of reducing variance associated with any individual tree and reducing correlations between the trees. Random forests rank the importance of all predictor variables by increases in mean standard errors when a given variable omitted from the model. The relative importance of each variable is derived by scaling the most important predictor to one; we examined all predictors with importance scores ≥ 0.10 relative to the most important predictor. Separate random forest models were evaluated for each of our measures of sleep quality (Sleep Depth and Restfulness). In addition, partial plots of random forest models, showing the impact of a given predictor on sleep quality while simultaneously accounting for all other variables in the model, were computed.
Similar results for common search (e.g., facebook)
Similar results for click time
Limited to sleep durations of 7-8 hours
Sleeping in associated with worse performance over the whole day (until 12 hours)
Waking early has normal performance
Worst performance with longest TIB then shortest TIB
Since shapes of previous curves are similar, can reduce to daily average then model impact of TIB
Change in absolute values, but not pattern…
SS is followed by 0.4/7 nights of insufficient sleep; SI 1.2/7; II 2.5/7
SS is followed by 0.4/7 nights of insufficient sleep; SI 1.2/7; II 2.5/7
aVariables assessed at baseline visit.
bSocioeconomic status available for men only.
cLiving alone status available for women only.
1Within two weeks of the visit
2At least one day per week