Appendix C — Variable Computations
C.1 Overview
This analysis aims to help to calculate the chronotype of a person based on his/her actigraphy record.
C.2 Setup
C.3 Compute the Duration of an Interval
C.4 Compute Chronotype
Total number of workdays and free days.
Code
wd <- 6
fd <- 17FPS on workdays and free days.
Code
fps_w <- parse_hms("07:01:10") |> as.duration()
fps_f <- parse_hms("07:24:31") |> as.duration()HIS on free days.
Code
his_f <- parse_hms("01:55:42")FPS weighted mean.
Code
fps_weight_mean <- ((fps_w * wd) + (fps_f * fd)) / (wd + fd)Mid-sleep on free days (proxy for chronotype).
Code
msf <- msl(his_f, fps_f)msf_sc <- msf_sc( msf, fps_w, fps_f, fps_weight_mean, FALSE ) |> round_time()
msf_sc ````