ActCosinor {ActCR}R Documentation

Cosinor Model for Circadian Rhythmicity

Description

A parametric approach to study circadian rhythmicity assuming cosinor shape.

Usage

ActCosinor(x, window = 1, export_ts = FALSE)

Arguments

x

vector vector of dimension n*1440 which reprsents n days of 1440 minute activity data

window

The calculation needs the window size of the data. E.g window = 1 means each epoch is in one-minute window.

export_ts

A Boolean to indicate whether time series should be exported

Value

A list with elements

mes

MESOR which is short for midline statistics of rhythm, which is a rhythm adjusted mean. This represents mean activity level.

amp

amplitude, a measure of half the extend of predictable variation within a cycle. This represents the highest activity one can achieve.

acro

acrophase, a meaure of the time of the overall high values recurring in each cycle. Here it has a unit of radian. This represents time to reach the peak.

acrotime

acrophase in the unit of the time (hours)

ndays

Number of days modeled

cosinor_ts

Exported data frame with time, time over days, original time series, fitted time series using cosinor model

References

Cornelissen, G. Cosinor-based rhythmometry. Theor Biol Med Model 11, 16 (2014). https://doi.org/10.1186/1742-4682-11-16

Examples

count1 = c(t(example_activity_data$count[c(1:2),-c(1,2)]))
cos_coeff = ActCosinor(x = count1, window = 1, export_ts = TRUE)

[Package ActCR version 0.3.0 Index]