Skip to content

In this project, we investigated the effect of partial sleep deprivation on participants mind wandering, executive functioning and mood.

Notifications You must be signed in to change notification settings

cogneuro-uit/mw-psd-eeg--2021--behaviour

Repository files navigation

The Effects of Partial Sleep Deprivation on Mind Wandering, Executive Performance and Affect

Data and analysis for the paper "The Effects of Partial Sleep Deprivation on Mind Wandering, Executive Performance and Affect".

Not yet published.

Preprint is available at PsyArXiv.

If you want to use this data/analysis in a research publication, please cite the paper (above).

@misc{aasen2025mwpsd,
  author = {Aasen, S. and Babiker, S. and Vangen, A. and Haugan, S. and Sandell, S. and Csifcsák, G. and Saksvik-Lehouillier, I. and Kam, J. and Mittner, M.},
  title = {The Effects of Partial Sleep Deprivation on Mind Wandering, Executive Performance and Affect},
  year = {2025},
  publisher = {OSF},
  url = {https://osf.io/kmqfz_v1},
  note = {Retrieved 23 July 2025}
}

Requirements

Analysis are coded in R. The scripts rely on a fair number of R-packages, in addition to Stan for the Bayesian analyses.

Setup and reproduction

This repository uses the ProjectTemplate directory layout and functions.

Manuscript

The manuscript (and Supplementary) can easily be generated by rendering the 00_manuscript.qmd (and 01_supplementary.qmd) under the reports/ folder. The script will automatically load all the data, preprocess them and generate the necessary figures and tables.

Data

All data used for the paper is available under data. Raw behavioural data (the Finger-Tapping Random Sequence Generation Task, FT-RSGT) is available under data/behaviour. Actigraphy sleep estimated data is available under data/actigraphy, and self-reported sleep data as well as baseline questionnaire is available under data/baseline+diary. Bayesian models and the raw adjusted sleep variables can be found under the data/ folder (as "Mod-Bayes" or "bayes_model" and "sleep_adjustment").

Preprocessing

The project contains a fully preprocessed pipeline. First, load the library (library(ProjectTemplate)) and then set the variable relative_path="" and then run the load.project(). This will not only munge the raw data to a finished preprocessed output (see example below), load the relevant packages and other local packages, but also create all figure and tables used in the manuscript (accessible via figs and tbls).

Variables

Sleep variables can be accessed as sleep* (e.g., sleeptimes_updated_trans).

# A tibble: 524 × 21
   subj  date       entered_bed entered_bed_cum tried_to_sleep tried_to_sleep_cum sleep_delay night_wake_ups
   <chr> <date>           <dbl>           <dbl>          <dbl>              <dbl>       <dbl>          <dbl>
 1 001   2021-02-27       NA               NA           NA                   NA        0                  NA
 2 001   2021-02-28       NA               NA           NA                   NA        0                  NA
 3 001   2021-03-01       NA               NA           NA                   NA        0                  NA
 4 001   2021-03-02       21.5             21.5         21.7                 21.7      0.25                3
 5 001   2021-03-03       21               21           21.0                 21.0      0.25                2
 6 001   2021-03-04       21               21           21.1                 21.1      0.0833              1
 7 001   2021-03-05       21               21           21.7                 21.7      0.417               0
 8 001   2021-03-06        0.5             24.5          0.667               24.7      0.167               0
 9 001   2021-03-07        1.17            25.2          1.17                25.2      0.05                4
10 001   2021-03-08       23               23            0.5                 24.5      0.0333              1
# ℹ 514 more rows
# ℹ 13 more variables: night_wake_up_time <dbl>, last_awaking <dbl>, rise_from_bed <dbl>, sleep_quality <dbl>,
#   sleep_time <dbl>, sleep_time_cum <dbl>, diff_awake_bed <dbl>, last_awaking_fix <dbl>, sleep_duration <dbl>,
#   notes <chr>, group <chr>, pre_control <dbl>, pre_sleepdep <dbl>
# ℹ Use `print(n = ...)` to see more rows

Behavioural data can be found under data* (e.g., data.probe.mood.sleep).

# A tibble: 1,700 × 37
   subj  session sleepdep probenum probenum_prop mw    mb    smw    apen     bv logapen logbv zlogapen  zlogbv group
   <chr> <chr>   <chr>       <dbl>         <dbl> <ord> <ord> <ord> <dbl>  <dbl>   <dbl> <dbl>    <dbl>   <dbl> <chr>
 1 001   S1      SD              1          0.04 2     3     2     0.584 0.0763   2.22  -2.57    0.153 -0.102  ESD  
 2 001   S1      SD              2          0.08 2     3     1     0.298 0.0501   0.930 -2.99   -1.12  -0.831  ESD  
 3 001   S1      SD              3          0.12 3     4     3     0.282 0.0648   0.890 -2.74   -1.16  -0.384  ESD  
 4 001   S1      SD              4          0.16 3     4     3     0.145 0.0646   0.600 -2.74   -1.44  -0.390  ESD  
 5 001   S1      SD              5          0.2  3     4     3     0.282 0.0528   0.889 -2.94   -1.16  -0.740  ESD  
 6 001   S1      SD              6          0.24 4     4     3     0.295 0.0766   0.920 -2.57   -1.13  -0.0945 ESD  
 7 001   S1      SD              7          0.28 3     4     3     0.187 0.0830   0.681 -2.49   -1.36   0.0444 ESD  
 8 001   S1      SD              8          0.32 3     2     4     0.130 0.0690   0.574 -2.67   -1.47  -0.276  ESD  
 9 001   S1      SD              9          0.36 4     3     4     0.420 0.112    1.30  -2.19   -0.753  0.560  ESD  
10 001   S1      SD             10          0.4  4     2     4     0.583 0.0767   2.20  -2.57    0.140 -0.0919 ESD  
# ℹ 1,690 more rows
# ℹ 22 more variables: post_neg <dbl>, post_pos <dbl>, pre_neg <dbl>, pre_pos <dbl>, Self.report_Wake <dbl>,
#   Self.report_Onset <dbl>, Self.report_Duration <dbl>, Actigraphy_Wake <dbl>, Actigraphy_Onset <dbl>,
#   Actigraphy_Duration <dbl>, Adjusted_Onset <dbl>, Adjusted_Wake <dbl>, Adjusted_Duration <dbl>,
#   Self.report_Duration.diff <dbl>, Actigraphy_Duration.diff <dbl>, Adjusted_Duration.diff <dbl>,
#   Self.report_Duration.diff.pos <dbl>, Actigraphy_Duration.diff.pos <dbl>, Adjusted_Duration.diff.pos <dbl>,
#   c.Self.report_Duration.diff.pos <dbl>, c.Actigraphy_Duration.diff.pos <dbl>, …
# ℹ Use `print(n = ...)` to see more rows

Scripts

Some data exploration and other testing can be found under the src/ folder.

About

In this project, we investigated the effect of partial sleep deprivation on participants mind wandering, executive functioning and mood.

Topics

Resources

Stars

Watchers

Forks