msf_scR Documentation

Compute MCTQ sleep-corrected local time of mid-sleep on work-free days

Description

[Maturing]

msf_sc() computes the sleep-corrected local time of mid-sleep on work-free days for standard, micro, and shift versions of the Munich ChronoType Questionnaire (MCTQ).

When using the shift version of the MCTQ, replace the value of sd_week to sd_overall, as instructed in the Arguments section.

Usage

msf_sc(msf, sd_w, sd_f, sd_week, alarm_f)

Arguments

msf

An hms object corresponding to the local time of mid-sleep on work-free days from a standard, micro, or shift version of the MCTQ questionnaire. You can use msl() to compute it.

sd_w

A Duration object corresponding to the sleep duration on work days from a standard, micro, or shift version of the MCTQ questionnaire. You can use sdu() to compute it.

sd_f

A Duration object corresponding to the sleep duration on work-free days from a standard, micro, or shift version of the MCTQ questionnaire. You can use sdu() to compute it.

sd_week

A Duration object corresponding to the average weekly sleep duration from a standard or micro version of the MCTQ questionnaire (you can use sd_week() to compute it) or the overall sleep duration of a particular shift from a shift version of the MCTQ questionnaire (you can use sd_overall() to compute it).

alarm_f

A logical object corresponding to the alarm clock use on work-free days from a standard, micro, or shift version of the MCTQ questionnaire. Note that, if alarm_f == TRUE, msf_sc cannot be computed, msf_sc() will return NA for these cases. For the μMCTQ, this value must be set as FALSE all times, since the questionnaire considers only the work-free days when the respondent does not use an alarm (e.g., alarm_f = rep(FALSE, length(msf))).

Details

Standard MCTQ functions were created following the guidelines in Roenneberg, Wirz-Justice, & Merrow (2003), Roenneberg, Allebrandt, Merrow, & Vetter (2012), and from The Worldwide Experimental Platform (theWeP, n.d.).

μMCTQ functions were created following the guidelines in Ghotbi et al. (2020), in addition to the guidelines used for the standard MCTQ.

MCTQ Shift functions were created following the guidelines in Juda, Vetter, & Roenneberg (2013), in addition to the guidelines used for the standard MCTQ.

See the References section to learn more.

Class requirements

The mctq package works with a set of object classes specially created to hold time values. These classes can be found in the lubridate and hms packages. Please refer to those package documentations to learn more about them.

Rounding and fractional time

Some operations may produce an output with fractional time (e.g., "19538.3828571429s (~5.43 hours)", 01:15:44.505). If you want, you can round it with round_time().

Our recommendation is to avoid rounding, but, if you do, make sure that you only round your values after all computations are done. That way you avoid round-off errors.

Value

An hms object corresponding to the MCTQ chronotype or sleep-corrected local time of mid-sleep on work-free days.

Guidelines

Roenneberg, Allebrandt, Merrow, & Vetter (2012), Ghotbi et al. (2020), Juda, Vetter, & Roenneberg (2013), and The Worldwide Experimental Platform (n.d.) guidelines for msf_sc() (MSF_sc) computation are as follows.

Notes

For standard and micro versions of the MCTQ

\textrm{If } Alarm_{F} = True \; , \; MSF_{sc} = \textrm{Not Available (NA)}

\textrm{Else if } SD_F ≤q SD_W \; , \; MSF_{sc} = MSF

\textrm{Else } \; , \; MSF_{sc} = MSF - \frac{SD_F - SD_{week}}{2}

Where:

* W = Workdays; F = Work-free days.

Note that, since:

MSF = SO_{F} + \frac{SD_{F}}{2}

Where:

The last condition of the MSF_sc computation can be simplified to:

MSF_{sc} = SO_{F} + \frac{SD_{F}}{2} - \frac{SD_{F} - SD_{week}}{2}

MSF_{sc} = SO_{F} + \frac{SD_{F}}{2} - \frac{SD_{F}}{2} + \frac{SD_{week}}{2}

MSF_{sc} = SO_{F} + \frac{SD_{week}}{2}

For the shift version of the MCTQ

\textrm{If } Alarm_{F}^{M/E/N} = True \; , \; MSF_{sc}^{M/E/N} = \textrm{Not Available (NA)}

\textrm{Else if } SD_{F}^{M/E/N} ≤q SD_{W}^{M/E/N} \; , \; MSF_{sc}^{M/E/N} = MSF^{M/E/N}

\textrm{Else } \; , \; MSF_{sc}^{M/E/N} = MSF^{M/E/N} - \frac{SD_{F}^{M/E/N} - \emptyset SD^{M/E/N}}{2}

Where:

* W = Workdays; F = Work-free days, M = Morning shift; E = Evening shift; N = Night shift.

Note that, since:

MSF^{M/E/N} = SO_{F}^{M/E/N} + \frac{SD_{F}^{M/E/N}}{2}

Where:

The last condition of the MSF_sc_M/E/N computation can be simplified to:

MSF_{sc}^{M/E/N} = SO_{F}^{M/E/N} + \frac{SD_{F}^{M/E/N}}{2} - \frac{SD_{F}^{M/E/N} - \emptyset SD^{M/E/N}}{2}

MSF_{sc}^{M/E/N} = SO_{F}^{M/E/N} + \frac{SD_{F}^{M/E/N}}{2} - \frac{SD_{F}^{M/E/N}}{2} + \frac{\emptyset SD^{M/E/N}}{2}

MSF_{sc}^{M/E/N} = SO_{F}^{M/E/N} + \frac{\emptyset SD^{M/E/N}}{2}

References

Ghotbi, N., Pilz, L. K., Winnebeck, E. C., Vetter, C., Zerbini, G., Lenssen, D., Frighetto, G., Salamanca, M., Costa, R., Montagnese, S., & Roenneberg, T. (2020). The μMCTQ: an ultra-short version of the Munich ChronoType Questionnaire. Journal of Biological Rhythms, 35(1), 98-110. \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("10.1177/0748730419886986")}

Juda, M., Vetter, C., & Roenneberg, T. (2013). The Munich ChronoType Questionnaire for shift-workers (MCTQ Shift). Journal of Biological Rhythms, 28(2), 130-140. \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("10.1177/0748730412475041")}

Roenneberg T., Allebrandt K. V., Merrow M., & Vetter C. (2012). Social jetlag and obesity. Current Biology, 22(10), 939-43. \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("10.1016/j.cub.2012.03.038")}

Roenneberg, T., Wirz-Justice, A., & Merrow, M. (2003). Life between clocks: daily temporal patterns of human chronotypes. Journal of Biological Rhythms, 18(1), 80-90. \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("10.1177/0748730402239679")}

The Worldwide Experimental Platform (n.d.). MCTQ. https://www.thewep.org/documentations/mctq/

See Also

Other MCTQ functions: fd(), gu(), le_week(), msl(), napd(), sd24(), sd_overall(), sd_week(), sdu(), sjl_sc(), sjl_weighted(), sjl(), so(), tbt()

Examples

## Scalar example

msf <- hms::parse_hms("04:00:00")
sd_w <- lubridate::dhours(6)
sd_f <- lubridate::dhours(7)
sd_week <- lubridate::dhours(6.29)
alarm_f <- FALSE
msf_sc(msf, sd_w, sd_f, sd_week, alarm_f)
#> 03:38:42 # Expected

msf <- hms::parse_hm("01:00:00")
sd_w <- lubridate::dhours(5.5)
sd_f <- lubridate::dhours(9)
sd_week <- lubridate::dhours(6.75)
alarm_f <- FALSE
msf_sc(msf, sd_w, sd_f, sd_week, alarm_f)
#> 23:52:30 # Expected

msf <- hms::parse_hms("05:40:00")
sd_w <- lubridate::dhours(7.5)
sd_f <- lubridate::dhours(10)
sd_week <- lubridate::dhours(8.5)
alarm_f <- TRUE
msf_sc(msf, sd_w, sd_f, sd_week, alarm_f)
#> NA # Expected (`msf_sc` cannot be computed if `alarm_f == TRUE`)

## Vector example

msf <- c(hms::parse_hms("03:45:00"), hms::parse_hm("04:45:00"))
sd_w <- c(lubridate::dhours(9), lubridate::dhours(6.45))
sd_f <- c(lubridate::dhours(5), lubridate::dhours(10))
sd_week <- c(lubridate::dhours(8.5), lubridate::dhours(9.2))
alarm_f <- c(FALSE, FALSE)
msf_sc(msf, sd_w, sd_f, sd_week, alarm_f)
#> 03:45:00 # Expected
#> 04:21:00 # Expected

## Rounding the output at the seconds level

msf <- hms::parse_hms("05:40:00")
sd_w <- lubridate::dhours(5.43678)
sd_f <- lubridate::dhours(9.345111)
sd_week <- lubridate::dhours(7.5453)
alarm_f <- FALSE
msf_sc(msf, sd_w, sd_f, sd_week, alarm_f)
#> 04:46:00.3402 # Expected

round_time(msf_sc(msf, sd_w, sd_f, sd_week, alarm_f))
#> 04:46:00 # Expected