Oura Sleep Metrics across Lunar Phases
In this post, I crunch my Oura data to see if my sleep differs across moon phases.
Yes, this post will be somewhat esoteric. I have been always curious to see if the moon has any effect on my behavior and psychological states. In this post, I look at the sleep metrics from my Oura ring.
I use “Lunar” package (available on CRAN) to assign moon phases based on dates. It’s done by calling a function “lunar.phase”, and depending on a parameter, you can request four or eight phases of the moon for any particular date:
ouralunar<-ouradat %>% mutate(phase=lunar.phase(dmy,name=4)) %>%
select(phase,onset_latency,duration,light,rem,deep,sleepscore) %>%
drop_na%>% rename(onset=onset_latency) %>%
mutate_at(vars(onset,duration,light,rem,deep,sleepscore),
funs(normalize)) %>%
mutate_at(vars(onset,duration,light,rem,deep,sleepscore),
funs(scale(.,center=TRUE,scale=FALSE)))
#switch to long format for graphing purposes
ouralong <- gather(ouralunar,"sleepvar","meanvalue",-phase)
ggplot(data = ouralong,
aes(x = phase, y = meanvalue,
color = phase)) +
geom_boxplot()+
facet_wrap(~sleepvar,nrow=3)+
theme_minimal()+ coord_flip()+
ggtitle("Oura Sleep Metrics across 4 Moon Phases")
For this analysis, I focus on the following metrics:
- onset latency
- duration of sleep
- light sleep
- rem sleep
- deep sleep
- Oura sleep score
Some of these metrics indeed differ across the moon phases, albeight slightly:
I am extremely sceptical when it comes to using statistical significance tests on self-tracking data (a more detailed post on that coming soon). But just for fun, simple ANOVA tests suggest that some of the differences are statistically significant. Specifically, duration and all three stages of sleep (light, rem, and deep) differ significantly across some of the moon phases:
> aov4phases<-aov(onset~ phase,data=ouralunar)
> tidy(aov4phases)
# A tibble: 2 x 6
term df sumsq meansq statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 phase 3 0.0980 0.0327 1.41 0.238
2 Residuals 1562 36.2 0.0231 NA NA
> aov4phases<-aov(duration~ phase,data=ouralunar)
> tidy(aov4phases)
# A tibble: 2 x 6
term df sumsq meansq statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 phase 3 0.211 0.0704 4.32 0.00482
2 Residuals 1562 25.4 0.0163 NA NA
> aov4phases<-aov(light~ phase,data=ouralunar)
> tidy(aov4phases)
# A tibble: 2 x 6
term df sumsq meansq statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 phase 3 0.269 0.0898 3.50 0.0149
2 Residuals 1562 40.0 0.0256 NA NA
> aov4phases<-aov(rem~ phase,data=ouralunar)
> tidy(aov4phases)
# A tibble: 2 x 6
term df sumsq meansq statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 phase 3 0.728 0.243 7.19 0.0000863
2 Residuals 1562 52.8 0.0338 NA NA
> aov4phases<-aov(deep~ phase,data=ouralunar)
> tidy(aov4phases)
# A tibble: 2 x 6
term df sumsq meansq statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 phase 3 0.238 0.0794 2.83 0.0373
2 Residuals 1562 43.8 0.0281 NA NA
> aov4phases<-aov(sleepscore~ phase,data=ouralunar)
> tidy(aov4phases)
# A tibble: 2 x 6
term df sumsq meansq statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 phase 3 0.225 0.0750 2.32 0.0732
2 Residuals 1562 50.4 0.0323 NA NA
>
Just for fun, a similar analysis done for eight lunar phases:
To conclude, there were differences in some sleep parameters across the lunar phases. But they are too small in terms of the actual impact and real life implications.