| 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 [aut, cre] (ORCID: <https://orcid.org/0000-0003-2328-9612>) |
| Maintainer: | Christine Blume <[email protected]> |
| License: | GPL-3 |
| Version: | 0.9.1 |
| Built: | 2026-05-15 09:27:18 UTC |
| Source: | https://github.com/christineblume/nparact |
Tools for computing classic non-parametric actigraphy measures, including interdaily stability (IS), intradaily variability (IV), relative amplitude (RA), as well as the L5 and M10 values and their respective start times.
Maintainer: Christine Blume [email protected] (ORCID)
Computes the classic non-parametric actigraphy measures interdaily stability (IS), intradaily variability (IV), relative amplitude (RA), as well as the L5 and M10 values and their respective start times, for a single actigraphy file.
nparACT_base(name, SR, cutoff = 1, plot = T, fulldays = T)nparACT_base(name, SR, cutoff = 1, plot = T, fulldays = T)
name |
Character string giving the name of the object in the workspace that contains the actigraphy data. |
SR |
Numeric. Sampling rate in Hertz (samples per second). |
cutoff |
Numeric. Activity threshold used to classify movement. Defaults to 1. |
plot |
Logical. If |
fulldays |
Logical. If |
The function expects the actigraphy data to be available in the
workspace under the name provided via name. Data are internally
pre-processed, optionally restricted to complete 24-hour periods,
and analysed using standard non-parametric actigraphy algorithms.
The input data may contain either two columns (time, activity) or
three columns (date, time, activity). Time variables are internally
converted to POSIXct. Missing values in the activity signal
are not permitted.
The computation of IS and IV is based on hourly averaged activity data. Relative amplitude (RA) is derived from the difference between the most active 10-hour period (M10) and the least active 5-hour period (L5).
A data frame with one row and the following columns:
Interdaily stability
Intradaily variability
Relative amplitude
Mean activity during the least active 5-hour period
Start time of the L5 period
Mean activity during the most active 10-hour period
Start time of the M10 period
Computes the classic non-parametric actigraphy measures: interdaily stability (IS), intradaily variability (IV), relative amplitude (RA), as well as the L5 and M10 values and their respective start times for all actigraphy files in a specified folder.
nparACT_base_loop(path, SR, cutoff = 1, plot = TRUE, fulldays = TRUE)nparACT_base_loop(path, SR, cutoff = 1, plot = TRUE, fulldays = TRUE)
path |
Character string. Path to the folder containing actigraphy files. |
SR |
Numeric. Sampling rate in Hertz (samples per second). |
cutoff |
Numeric. Activity threshold used to classify movement. Defaults to 1. |
plot |
Logical. If |
fulldays |
Logical. If |
Each file is expected to contain either two columns (time, activity) or
three columns (date, time, activity). Time variables are internally
converted to POSIXct. Missing values in the activity signal are
not permitted.
Each file should contain either two columns (time, activity) or three columns (date, time, activity). Time variables are converted to POSIXct. Missing activity values are not allowed. The function filters activity, computes minute/hourly averages, calculates IS/IV/RA, and optionally plots grand-average activity profiles.
A data frame with one row per file and the following columns:
Interdaily stability
Intradaily variability
Relative amplitude
Mean activity during the least active 5-hour period
Start time of the L5 period
Mean activity during the most active 10-hour period
Start time of the M10 period
Computes the classic non-parametric actigraphy measures interdaily stability (IS), intradaily variability (IV), and relative amplitude (RA), as well as the L5 and M10 values and their respective start times. In addition, the function computes a flexible low-activity period (Lflex) of user-defined duration and its start time for a single actigraphy file.
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 giving the name of the object in the workspace that contains the actigraphy data. |
SR |
Numeric. Sampling rate in Hertz (samples per second). |
cutoff |
Numeric. Activity threshold used to classify movement. Defaults to 1. |
minutes |
Numeric. Length of the flexible low-activity window (Lflex) in minutes. |
plot |
Logical. If |
fulldays |
Logical. If |
The function expects the actigraphy data to be available in the
workspace under the name provided via name. Data are internally
pre-processed, optionally restricted to complete 24-hour periods,
and analysed using standard non-parametric actigraphy algorithms.
The input data may contain either two columns (time, activity) or
three columns (date, time, activity). Time variables are internally
converted to POSIXct. Missing values in the activity signal
are not permitted.
Interdaily stability (IS) and intradaily variability (IV) are computed
from hourly averaged activity data. Relative amplitude (RA) is derived
from the difference between the most active 10-hour period (M10) and
the least active 5-hour period (L5). The flexible low-activity measure
(Lflex) represents the least active contiguous period of the duration
specified by minutes.
A data frame with one row and the following columns:
Interdaily stability
Intradaily variability
Relative amplitude
Mean activity during the least active 5-hour period
Start time of the L5 period
Mean activity during the most active 10-hour period
Start time of the M10 period
Mean activity during the least active flexible period
Start time of the Lflex period
Computes the classic non-parametric actigraphy measures interdaily stability (IS), intradaily variability (IV), and relative amplitude (RA), as well as the L5 and M10 values and their respective start times. In addition, the function computes a flexible low-activity period (Lflex) of user-defined duration and its start time, looping over all actigraphy files contained in a specified directory.
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 specifying the path to a directory containing the actigraphy files to be analysed. |
SR |
Numeric. Sampling rate in Hertz (samples per second). |
cutoff |
Numeric. Activity threshold used to classify movement. Defaults to 1. |
minutes |
Numeric. Length of the flexible low-activity window (Lflex) in minutes. |
plot |
Logical. If |
fulldays |
Logical. If |
Each file in the directory is processed independently using the same parameters. Results are returned as one row per file.
Files in path are expected to be plain text or CSV files
with either two columns (time, activity) or three columns
(date, time, activity). Time variables are internally converted
to POSIXct. Missing values in the activity signal are not
permitted.
Interdaily stability (IS) and intradaily variability (IV) are computed
from hourly averaged activity data. Relative amplitude (RA) is derived
from the difference between the most active 10-hour period (M10) and
the least active 5-hour period (L5). The flexible low-activity measure
(Lflex) represents the least active contiguous period of the duration
specified by minutes.
If plot = TRUE, an aggregated (grand average) hourly activity
profile across all files is generated.
A data frame with one row per processed file and the following columns:
Interdaily stability
Intradaily variability
Relative amplitude
Mean activity during the least active 5-hour period
Start time of the L5 period
Mean activity during the most active 10-hour period
Start time of the M10 period
Mean activity during the least active flexible period
Start time of the Lflex period
A dataset containing actimetry results for one participant. Data points have been collected every 15 sec and span approx. 3.5 days. The variables are as follows:
sleepstudysleepstudy
A txt file with 20000 rows and 2 variables:
Time stamp
Gives the activity measured with actigrapy (arbitrary number)