`msf_sc()`

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

`chronotype()`

is just a wrapper for `msf_sc()`

.

When using the shift version of the MCTQ, replace the value of `sd_week`

to
`sd_overall`

, as instructed in the Arguments section.

## Arguments

- msf
A

`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 those cases. For the \(\mu\)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.

## Value

A `hms`

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

## 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.).

**\(\mu\)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.

## 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 all cases, \(MSF_{sc}\) cannot be computed if the participant wakes up with an alarm clock on work-free days (\(Alarm_F\)).

For MCTQ\(^{Shift}\), the computation below must be applied to each shift section of the questionnaire.

\(MSF_{sc}\) is a proxy for the participant chronotype in standard and micro versions of the MCTQ.

The basis for estimating chronotype in shift-workers is the mid-sleep on work-free days after evening shifts (\(MSF^E\)). In case work schedules do not comprise evening shifts, Juda, Vetter, & Roenneberg (2013) propose to derive it from the \(MSF_{sc}\) of other shifts (e.g., by using a linear model). Unfortunately, the

`mctq`

package can't help you with that, as it requires a closer look at your data.\(MSF_{sc}\) depends on developmental and environmental conditions (e.g., age, light exposure). For epidemiological and genetic studies, \(MSF_{sc}\) must be normalized for age and sex to make populations of different age and sex compositions comparable (Roenneberg, Allebrandt, Merrow, & Vetter, 2012).

If you are visualizing this documentation in plain text (

`ASCII`

), you may have some trouble understanding the equations. If you want a better viewer, you can see this documentation on the package website.

### For standard and micro versions of the MCTQ

**$$\textrm{If } SD_F \leq SD_W \; , \; MSF$$**
**$$\textrm{If } SD_F > SD_W \; , \; MSF - \frac{SD_F - SD_{week}}{2}$$**

Where:

\(MSF\) = local time of mid-sleep on work-free days.

\(SD_W\) = sleep duration on workdays.

\(SD_F\) = sleep duration on work-free days.

\(SD_{week}\) = average weekly sleep duration.

***** \(W\) = workdays; \(F\) = work-free days.

### For the shift version of the MCTQ

**$$\textrm{If } SD_{F}^{M/E/N} \leq SD_{W}^{M/E/N} \; , \; MSF^{M/E/N}$$**
**$$\textrm{If } SD_{F}^{M/E/N} > SD_{W}^{M/E/N} \; , \; MSF^{M/E/N} -
\frac{SD_{F}^{M/E/N} - \emptyset SD^{M/E/N}}{2}$$**

Where:

\(MSF^{M/E/N}\) = local time of mid-sleep between two free days after a particular shift.

\(SD_{W}^{M/E/N}\) = sleep duration between two days in a particular shift.

\(SD_{F}^{M/E/N}\) = sleep duration between two free days after a particular shift.

\(\emptyset SD^{M/E/N}\) = overall sleep duration of a particular shift.

***** \(W\) = workdays; \(F\) = work-free days, \(M\) =
morning shift; \(E\) = evening shift; \(N\) = night shift.

## Missing sections in standard and micro MCTQ versions

Although the standard and micro versions of the MCTQ asks for respondents to
complete the workdays and work-free days sections, even when they do not
have a regular work schedule (`wd = 0`

) or have a 7 day/week work schedule
(`wd = 7`

), some of them may still end skipping one of this parts of the
questionnaire. In those cases, `sd_week()`

, `sloss_week()`

, `le_week()`

,
`msf_sc()`

, `sjl_rel()`

, and `sjl()`

will produce `NA`

(Not Available) as
output. That's because those computations combine workdays and work-free days
variables.

For those special standard and micro MCTQ cases, where one section is
missing, a `NA`

value is the correct output for the functions mentioned above
when `wd`

(number of workdays per week) are `wd > 0 & wd < 7`

, but it may not
be when `wd == 0`

or `wd == 7`

. There are different approaches to deal with
this issue. See `vignette("missing-sections", package = "mctq")`

to learn
more.

## 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 \(\mu\)MCTQ: an ultra-short version of the Munich ChronoType
Questionnaire. *Journal of Biological Rhythms*, *35*(1), 98-110.
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. doi: 10.1177/0748730412475041
.

Roenneberg T., Allebrandt K. V., Merrow M., & Vetter C. (2012). Social jetlag
and obesity. *Current Biology*, *22*(10), 939-43.
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. doi: 10.1177/0748730402239679
.

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

## 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
#> 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
#> 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
#> 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
#> 04:21:00
#> 03:45:00 # Expected
#> 04:21:00 # Expected
## A wrapper for msf_sc()
msf <- hms::parse_hms("07:00:00")
sd_w <- lubridate::dhours(6)
sd_f <- lubridate::dhours(12)
sd_week <- lubridate::dhours(9.45)
alarm_f <- FALSE
chronotype(msf, sd_w, sd_f, sd_week, alarm_f)
#> 05:43:30
#> 05:43:30 # 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
x <- msf_sc(msf, sd_w, sd_f, sd_week, alarm_f)
x
#> 04:46:00.3402
#> 04:46:00.3402 # Expected
round_time(x)
#> 04:46:00
#> 04:46:00 # Expected
```