Sleep Restriction and Reinforcement Learning - Data Analysis - Andreas Gerhardsson; Danja Porada; Johan Lundström; John Axelsson; Johanna Schwarz (Stockholm University, 2020)
Project descriptionIn this study we investigated the effect of two nights of sleep restriction on reinforcement learning using a probabilistic selection task. The current data set includes data from 32 participants measured before normal sleep and after two nights of sleep restriction, collected during the summer of 2016. Besides data from the probabilistic selection task there is sleepiness and stress ratings assessed before the task.
The analysis was done using R, and the data set includes analysis scripts for all analyses performed.
Recommended citation for this dataset:Gerhardsson A, Porada K D, Lundström N J, Axelsson J & Schwarz J (2020) Datafrom: Does insufficient sleep affect how you learn from reward or punishment? –Reinforcement learning after two nights of sleep restriction.10.17045/sthlmuni.11955939
File ListSleep Restriction and Reinforcement Learning - Data Analysis | - data/ | - pst_full_data.txt | - scripts/ | - pst_cm_1_fit.R | - pst_cm_2_preanalysis.R | - pst_cm_3_analysis.R | - pst_kss.R | - pst_lp_rt.R | - pst_lp_winstay_loseshift.R | - pst_plot_fnc.R | - pst_supplementary.R | - pst_test_phase_rt.R | - pst_test_phase.R | - RL_regressors_1a.stan | - RL_regressors.stan
Models, plots and tables are produced by the scripts

Variable List for pst_full_data.txt (Variable // Description)
Code // subject + sleep condition + ordersubject // Subject IDsleep // sleep condition charactersr // sleep restriction (1 = yes, =, no)BaselineFirst // order of sleep condition (1 = normal sleep first, 0 = Sleeprestriction first)female // gender (1 = female, 0 = male)age // Age in yearsnight // not relevantdays_between_tests // days between teststesttime // time of test HH:MM:SS default originblockcode // block code of PST (learning phase or test phase)blocknum // block number of PST (first block = 4)trialcode // trial code of PST (symbol + order + phase)trialnum // trial number, originally including all events (responses etc.)stimulusitem1 // experiment path to symbol 1, not relevant for analysis, seeFigur 1 in manuscript.stimulusitem2 // experiment path to symbol 2, not relevant for analysis, seeFigur 1 in manuscript.values.winletter // which symbol to winresponse_key // response key number on keyboardvalues.selectedletter // symbol chosencorrect // correct during learning phase = positive feedback, during test phase= best optionresponse_time_ms // response time in millisecondsexpressions.percA_ab // cumulative proportion correct for symbol pair ABexpressions.percC_CD // cumulative proportion correct for symbol pair CDexpressions.percE_EF // cumulative proportion correct for symbol pair EFBed time // Bedtime according to actigraphGet up time // get up time according to actigraphTime in bed // Time in bed according to actigraphSleep start // Sleep start according to actigraphSleep end // Sleep end according to actigraphAssumed sleep // Assumed sleep according to actigraphActual sleep time // Actual sleep according to actigraph (H:M:S)Actual sleep (%) // Actual sleep percent according to actigraphActual wake time // Actual wake according to actigraph (H:M:S)Actual wake (%) // Actual wake percent according to actigraphSleep efficiency // Sleep efficiency percent according to actigraphSleep latency // Sleep latency according to actigraph (H:M:S)get_up_easy // sleep diary easy to get up (5 = very easy, 1 = very difficult)well_rested // well rested after sleep (5 = fully, 1 = not at all)KSS // Karolinska sleepiness scaleSUSS // Subjective stress scalekss_rt_ms // Karolinska sleepiness scale, response time in millisecondsstress_rt_ms // Subjective stress scale, response time in milliseconds
METHODOLOGICAL INFORMATION
1. Description of methods used for collection/generation of data:See published article and supplementary material
2. Methods for processing the data:
win-stay and lose-shift was calculated for each participant by sleep conditionand symbol pair.
win-stay = 1 if stay = 1 and feedback = positive, else win-stay = 0.lose-shift = 1 if stay = 0 and feedback = negative, else lose-shift = 0.
3. Instrument- or software-specific information needed to interpret the data:Software and packages required to run analyses, install may also include otherpackage dependenciesR (https://www.r-project.org/) Packages: bayesplot - Gabry J, Mahr T (2019). “bayesplot: Plotting for BayesianModels.” Rpackage version 1.7.0 package version 1.7.0 bayestestR - Makowski, D., Ben-Shachar, M., & Lüdecke, D. (2019). bayestestR: Describing Effects and their Uncertainty, Existence and Significance within the Bayesian Framework. Journal of Open Source Software, 4(40), 1541. doi:10.21105/joss.01541 brms - Paul-Christian Bürkner (2017). brms: An R Package for Bayesian Multilevel Models Using Stan. Journal of Statistical Software, 80(1), 1-28. doi:10.18637/jss.v080.i01 ggplot2 - H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016. ggpubr - Alboukadel Kassambara (2019). ggpubr: 'ggplot2' Based Publication Ready Plots. R package version 0.2.4. https://CRAN.R-project.org/package=ggpubr gridExtra - Baptiste Auguie (2017). gridExtra: Miscellaneous Functions for"Grid" Graphics. R Graphics. R package version 2.3. https://CRAN.R-project.org/package=gridExtra plyr - Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. URL http://www.jstatsoft.org/v40/i01/. rstanarm - Goodrich B, Gabry J, Ali I & Brilleman S. (2018). rstanarm: Bayesian applied regression modeling via Stan. R package version 2.17.4. http://mc-stan.org/ see - Daniel Lüdecke, Dominique Makowski, Philip Waggoner and Mattan S. Ben-Shachar (2019). see: Visualisation Toolbox for 'easystats' and Extra Geoms, Themes and Color Palettes for 'ggplot2'. R package version 0.3.0. https://CRAN.R-project.org/package=see shinystan - Jonah Gabry (2018). shinystan: Interactive Visual and Numerical Diagnostics and Posterior Analysis for Bayesian Models. R package version 2.5.0. https://CRAN.R-project.org/package=shinystan wesanderson - Karthik Ram and Hadley Wickham (2018). wesanderson: A Wes Anderson Palette Generator. R package version 0.3.6.https://CRAN.R-project.org/package=wesanderson
Software used to perform Probalisitic Selection Task Inquisit 4 (www.millisecond.com)
Keywords: 170202 Decision Making; 170299 Cognitive Science not elsewhere classified; Psychology; Psykologi