Title: | Non-Parametric Measures of Actigraphy Data |
---|---|
Description: | Computes interdaily stability (IS), intradaily variability (IV) & the relative amplitude (RA) from actigraphy data as described in Blume et al. (2016) <doi: 10.1016/j.mex.2016.05.006> and van Someren et al. (1999) <doi: 10.3109/07420529908998724>. Additionally, it also computes L5 (i.e. the 5 hours with lowest average actigraphy amplitude) and M10 (the 10 hours with highest average amplitude) as well as the respective start times. The flex versions will also compute the L-value for a user-defined number of minutes. IS describes the strength of coupling of a rhythm to supposedly stable zeitgebers. It varies between 0 (Gaussian Noise) and 1 for perfect IS. IV describes the fragmentation of a rhythm, i.e. the frequency and extent of transitions between rest and activity. It is near 0 for a perfect sine wave, about 2 for Gaussian noise and may be even higher when a definite ultradian period of about 2 hrs is present. RA is the relative amplitude of a rhythm. Note that to obtain reliable results, actigraphy data should cover a reasonable number of days. |
Authors: | Christine Blume <[email protected]> Nayantara Santhi <[email protected]> Manuel Schabus <[email protected]> |
Maintainer: | Christine Blume <[email protected]> |
License: | GPL-2 |
Version: | 0.8 |
Built: | 2025-03-09 05:11:15 UTC |
Source: | https://github.com/christineblume/nparact |
Computes interdaily stability (IS), intradaily variability (IV) and the relative amplitude (RA) from actigraphy data for single or multiple actigraphy files as described in van Someren et al. (1999). Additionally, it also computes the L5 (i.e. the 5 hours with lowest average actigraphy amplitude) and M10 (the 10 hours with highest average amplitude) values as well as the respective start times. The flex versions will also compute the L-value for a user-defined number of minutes. IS describes the strength of coupling of a rhythm to supposedly stable zeitgebers such as sunlight. It varies between 0 (Gaussian Noise) and 1 for perfect IS. IV describes the fragmentation of a rhythm, i.e. the frequency and extent of transitions between rest and activity. It is near 0 for a perfect sine wave, about 2 for Gaussian noise and may be even higher when a definite ultradian period of about 2 hrs is present. RA is the relative amplitude of a rhythm. Note that to obtain reliable results, actigraphy data should cover a reasonable number of days.
Package: | nparACT |
Type: | Package |
Version: | 0.8 |
Date: | 2017-12-19 |
Christine Blume <[email protected]> Nayantara Santhi <[email protected]> Manuel Schabus <[email protected]>
Blume C., Santhi N., Schabus M. (2016). "nparACT" package for R: A free software tool for the non-parametric analysis of actigraphy data. MethodsX 3: 430-435. <doi:10.1016/j.mex.2016.05.006> van Someren E.J., 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-18. <doi:10.3109/07420529908998724>
# example function nparACT_base data(sleepstudy) r <- nparACT_base("sleepstudy", SR = 4/60)
# example function nparACT_base data(sleepstudy) r <- nparACT_base("sleepstudy", SR = 4/60)
A list of auxiliary functions used in the main functions.
nparACT_auxfunctions1
nparACT_auxfunctions1
A list of auxiliary functions used in the main functions.
nparACT_auxfunctions2
nparACT_auxfunctions2
Function returns IS, IV, RA, L5, M10 as well as L5 and M10 start times for single actigraphy files. The function also returns a classic dual day plot for the data, a plot of minutewise averages across 24 hours as well as a plot for hourly averages across 24 hours.
nparACT_base(name, SR, cutoff = 1, plot = T, fulldays = T)
nparACT_base(name, SR, cutoff = 1, plot = T, fulldays = T)
name |
Character string containing the actigraphy file name. Actigraphy files must contain a first column with a date/time vector, which must be of form |
SR |
Sampling rate in Hz. |
cutoff |
Can be used to define a cutoff for actigraphy data. Default value is |
plot |
If |
fulldays |
If |
Data frame containing IS, IV and RA values. Besides this, L5 and M10 values are given along with the respective start times.
Christine Blume <[email protected]> Nayantara Santhi <[email protected]> Manuel Schabus <[email protected]>
Function returns IS, IV, RA, L5, M10 as well as L5 and M10 start times for multiple actigraphy files. The function also returns a plot for hourly grand averages across 24 hours.
nparACT_base_loop(path, SR, cutoff = 1, plot = T, fulldays = T)
nparACT_base_loop(path, SR, cutoff = 1, plot = T, fulldays = T)
path |
Character string containing path to location of actigraphy files. Actigraphy files must contain a first column with a date/time vector, which must be of form |
SR |
Sampling rate in Hz. |
cutoff |
Can be used to define a cutoff for actigraphy data. Default value is |
plot |
If |
fulldays |
If |
Data frame containing IS, IV and RA values for each file. Besides this, L5 and M10 values are given along with the respective start times.
Christine Blume <[email protected]> Nayantara Santhi <[email protected]> Manuel Schabus <[email protected]>
# example function nparACT_loop data(sleepstudy) name <- "sleepstudy_example" newdir <- file.path(tempdir(),name) dir.create(newdir, showWarnings = FALSE) olddir <- setwd(newdir) write.table(sleepstudy, file = "sleepstudy.txt", row.names=FALSE, col.names = FALSE) r <- nparACT_base_loop(newdir, SR = 4/60) setwd(olddir)
# example function nparACT_loop data(sleepstudy) name <- "sleepstudy_example" newdir <- file.path(tempdir(),name) dir.create(newdir, showWarnings = FALSE) olddir <- setwd(newdir) write.table(sleepstudy, file = "sleepstudy.txt", row.names=FALSE, col.names = FALSE) r <- nparACT_base_loop(newdir, SR = 4/60) setwd(olddir)
Function returns IS, IV, RA, L5, M10 as well as L5 and M10 start times for single actigraphy files. Additionally, it also returns the L value (Lflex) and the start time for a specified number of minutes. The function also returns a classic dual day plot for the data, a plot of minutewise averages across 24 hours as well as a plot for hourly averages across 24 hours.
nparACT_flex(name, SR, cutoff = 1, minutes, plot = T, fulldays = T)
nparACT_flex(name, SR, cutoff = 1, minutes, plot = T, fulldays = T)
name |
Character string containing the actigraphy file name. Actigraphy files must contain a first column with a date/time vector, which must be of form |
SR |
Sampling rate in Hz. |
cutoff |
Can be used to define a cutoff for actigraphy data. Default value is |
minutes |
Number of minutes for which the Lflex value should be computed. |
plot |
If |
fulldays |
If |
Data frame containing IS, IV and RA values. Besides this, L5, M10 and Lflex (for the number of minutes specified) values are given along with the respective start times.
Christine Blume <[email protected]> Nayantara Santhi <[email protected]> Manuel Schabus <[email protected]>
# example function nparACT data(sleepstudy) r <- nparACT_flex("sleepstudy", SR = 4/60, minutes = 435)
# example function nparACT data(sleepstudy) r <- nparACT_flex("sleepstudy", SR = 4/60, minutes = 435)
Function returns IS, IV, RA, L5, M10 as well as L5 and M10 start times for single actigraphy files. Additionally, it also returns the L value (Lflex) and the start time for a specified number of minutes. The function also returns a classic dual day plot for the data, a plot of minutewise averages across 24 hours as well as a plot for hourly averages across 24 hours.
nparACT_flex_loop(path, SR, cutoff = 1, minutes, plot = T, fulldays = T)
nparACT_flex_loop(path, SR, cutoff = 1, minutes, plot = T, fulldays = T)
path |
Character string containing path to location of actigraphy files. Actigraphy files must contain a first column with a date/time vector, which must be of form |
SR |
Sampling rate in Hz. |
cutoff |
Can be used to define a cutoff for actigraphy data. Default value is |
minutes |
Number of minutes for which the Lflex value should be computed. |
plot |
If |
fulldays |
If |
Data frame containing IS, IV and RA values for each file. Besides this, L5, M10 and Lflex (for the number of minutes specified) values are given along with the respective start times.
Christine Blume <[email protected]> Nayantara Santhi <[email protected]> Manuel Schabus <[email protected]>
# example function nparACT_flex_loop data(sleepstudy) name <- "sleepstudy_example" newdir <- file.path(tempdir(),name) dir.create(newdir, showWarnings = FALSE) olddir <- setwd(newdir) write.table(sleepstudy, file = "sleepstudy.txt", row.names=FALSE, col.names = FALSE) r <- nparACT_flex_loop(newdir, SR = 4/60, minutes = 435) setwd(olddir)
# example function nparACT_flex_loop data(sleepstudy) name <- "sleepstudy_example" newdir <- file.path(tempdir(),name) dir.create(newdir, showWarnings = FALSE) olddir <- setwd(newdir) write.table(sleepstudy, file = "sleepstudy.txt", row.names=FALSE, col.names = FALSE) r <- nparACT_flex_loop(newdir, SR = 4/60, minutes = 435) setwd(olddir)
A list of auxiliary functions used in the main functions.
nparACT_ISIVfunctions
nparACT_ISIVfunctions
A list of auxiliary functions used in the main functions.
nparACT_RAfunctions
nparACT_RAfunctions
Actigraphy data for a sleep study have been collected with wrist actigraphy.
data("sleepstudy")
data("sleepstudy")
A data frame with 11520 observations on the following 2 variables.
V1
a factor with levels 2016-01-04 00:00:00
2016-01-04 00:00:15
etc.
V2
a numeric vector
data(sleepstudy) ## quick overview head(sleepstudy)
data(sleepstudy) ## quick overview head(sleepstudy)