Non-Parametric Measures of Actigraphy Data

Computes interdaily stability (IS), intradaily variability (IV) & the relative amplitude (RA) from actigraphy data as described in Blume et al. (2016) and van Someren et al. (1999) . 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.


The nparACT package

Package and main function

The package computes the interdaily stability (IS), intradaily variability (IV) and relative amplitude (RA) of activity values. Moreover, it gives the start times and average activity of M10 (i.e. 10 h with maximal activity) and L5 (i.e. five hours with least activity). In the package, we additionally included the possibility to find the lowest activity during a user-defined time window, termed the Lflex value. This way one could, for instance, look for the 7.5 h with least activity in a group of insomniacs and see whether their average activity levels during this time or whether the start time deviates from a healthy control group. For further details, please see the accompanying publication by Blume et al. https://doi.org/10.1016/j.mex.2016.05.006.

Worked example

First, we install and load the package if we haven’t done so.

## First, we save your current workspace
save.image(file=paste(tempdir(), "currsession.RData", sep = "/"))
## make sure you start with a clean session.
rm(list = ls(all = TRUE))
install.packages("nparACT", repos = "http://cran.us.r-project.org")

Then, we are ready to use the package on our data set.

Create directory & save data file

First, we load the sleepstudy file that comes with the package and create a directory, where we save it.

library(nparACT)
data(sleepstudy)

## save current working directory so we can reset this later.
olddir <- getwd()

## create a new directory in the temporary directory (don't worry, it will automatically be deleted  
## when you restart your computer)
newdir <- file.path(tempdir(),"nparACT_exmpl")
dir.create(newdir, showWarnings = FALSE)

## write the sleepstudy file to this new directory
write.table(sleepstudy, file = paste(newdir, "sleepstudy.txt", sep = "/"),
row.names=FALSE, col.names = FALSE, quote = FALSE, sep = ",")
Run the analyses

Then, we apply the actual analysis function.

nparACT::nparACT_base("sleepstudy", SR = 4/60) 

## We again load the workspace image from before the code above was executed
save.image(file=paste(tempdir(), "currsession.RData", sep = "/"))

## we set the directory back to the one we were using before as we were just working in the  
## temp directory.
setwd(olddir)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("nparACT")

0.9.1 by Christine Blume, 10 months ago


Browse source code at https://github.com/cran/nparACT


Authors: Christine Blume [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports ggplot2, grid, stringr, zoo, tools

Suggests knitr, rmarkdown, roxygen2


Suggested by actiRhythm.


See at CRAN