Command: Rscript --vanilla R/sleep_diary_alignment.R Also executed in analysis.qmd via knitr::read_chunk at the corresponding analytical stages. Seed: 20261106; 2000 participant-cluster bootstrap replicates per scope/context. Diary MSFsc-equivalent seed: 20261107; 2000 participant bootstrap replicates on the common eligible sample. Diary correction uses mean sleep-period duration weighted by each participant's observed work/free night counts; correction is zero if free-day duration is not longer. No diary alarm-use field is available. This is an MSFsc equivalent, not a full MCTQ rescore. Upstream daytype2 field label: Today is...; wake label: final awakening today. Sleep onset field verified as sleepprep_wall plus sleepdelay minutes. Wall-clock timestamps encode local labels in UTC; UTC fields retain elapsed-time coordinates. Lifecycle references checked 2026-11-06: dplyr.tidyverse.org/reference/summarise.html; dplyr.tidyverse.org/reference/mutate-joins.html; ggplot2.tidyverse.org/reference/geom_point.html. Formula checked 2026-11-06: docs.ropensci.org/mctq/reference/msf_sc.html; docs.ropensci.org/mctq/reference/sd_week.html. Observed night counts replace the usual weekly weights. R version 4.6.1 (2026-06-24) Platform: aarch64-apple-darwin23 Running under: macOS Golden Gate 27.0.1 Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1 locale: [1] C.UTF-8/C.UTF-8/C.UTF-8/C/C.UTF-8/C.UTF-8 time zone: Europe/Berlin tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ggplot2_4.0.3 tidyr_1.3.2 dplyr_1.2.1 mgcv_1.9-4 nlme_3.1-168 loaded via a namespace (and not attached): [1] gt_1.3.0 utf8_1.2.6 sass_0.4.10 generics_0.1.4 [5] xml2_1.6.0 stringi_1.8.7 lattice_0.22-7 digest_0.6.39 [9] magrittr_2.0.5 evaluate_1.0.5 grid_4.6.1 RColorBrewer_1.1-3 [13] fastmap_1.2.0 jsonlite_2.0.0 Matrix_1.7-6 purrr_1.2.2 [17] ggokabeito_0.1.0 scales_1.4.0 textshaping_1.0.5 cli_3.6.6 [21] rlang_1.3.0 splines_4.6.1 withr_3.0.3 yaml_2.3.12 [25] otel_0.2.0 tools_4.6.1 nanonext_1.10.0 gratia_0.11.2 [29] png_0.1-9 vctrs_0.7.3 R6_2.6.1 lifecycle_1.0.5 [33] stringr_1.6.0 tweedie_3.1.0 fs_2.1.0 htmlwidgets_1.6.4 [37] ragg_1.5.2 pkgconfig_2.0.3 pillar_1.11.1 gtable_0.3.6 [41] LightLogR_0.10.3 glue_1.8.1 Rcpp_1.1.2 systemfonts_1.3.2 [45] statmod_1.5.2 xfun_0.59 tibble_3.3.1 tidyselect_1.2.1 [49] knitr_1.51 farver_2.1.2 htmltools_0.5.9 mirai_2.7.1 [53] patchwork_1.3.2 labeling_0.4.3 rmarkdown_2.31 compiler_4.6.1 [57] S7_0.2.2 mvnfast_0.2.8