intradaily_variability: Intradaily variability (IV)

View source: R/intradaily_variability.R

intradaily_variabilityR Documentation

Intradaily variability (IV)

Description

This function calculates the variability of consecutive light levels within a 24h day. Calculated as the ratio of the variance of the differences between consecutive light levels to the total variance across the day. Calculated for mean hourly light levels. Higher values indicate more fragmentation.

Usage

intradaily_variability(lightVar, datetimeVar, as_df = TRUE)

Arguments

lightVar

Numeric vector containing the light data.

datetimeVar

Vector containing the time data. Must be POSIXct.

as_df

Logical. Should the output be returned as a data frame? Defaults to TRUE.

Value

Single column data frame or vector.

References

Van Someren, E. J. W., Swaab, D. F., Colenda, C. C., Cohen, W., McCall, W. V., & Rosenquist, P. B. (1999). Bright Light Therapy: Improved Sensitivity to Its Effects on Rest-Activity Rhythms in Alzheimer Patients by Application of Nonparametric Methods. Chronobiology International, 16(4), 505–518. https://doi.org/10.3109/07420529908998724


steffenhartmeyer/lightdosimetry documentation built on Jan. 29, 2024, 12:48 p.m.