Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cosinor_features

Multiple Component Cosinor Features


Description

Extract the special/global features of a multiple component cosinor. In a multiple component model, there are specific parameters that are not within the model itself, but must be extracted from the model fit. When extracted, can be used to improve the plot of a multiple component cosinor. However, this is only possible if the cosinor is harmonic (see details). For single-component models, the orthophase is the same as the acrophase and the global amplitude

  • Global Amplitude (Ag) = the overall amplitude is defined as half the difference between the peak and trough values

  • Orthophase (Po) = the lag until the peak time

  • Bathyphase (Pb) = the lag until the trough time

Usage

cosinor_features(object, population = TRUE, ...)

Arguments

object

Model of class cosinor with multiple periods

population

If the object is a population cosinor, should the features be calculated for the individual cosinors or for the population-cosinors. Default is TRUE. This has no effect on "Individual" cosinor objects.

  • If TRUE, then will calculate features for entire population.

  • If FALSE, then will calculate features for every individual cosinor in the population.

...

For extensibility

Details

These calculations can only occur if the periods of the cosinor are harmonic - as in, the longest period is a integer multiple of the smallest period (known as the fundamental frequency). Otherwise, these statistics are not accurate or interpretable.

Value

When returning the cosinor features for a single model, will return an object of class list. When returning the cosinor features for every individual in a population cosinor, will return an object of class tibble.

Examples

data(twins)
model <- cosinor(rDYX ~ hour, twins, c(24, 8), "patid")
results <- cosinor_features(model, population = FALSE)
head(results)

card

Cardiovascular and Autonomic Research Design

v0.1.0
MIT + file LICENSE
Authors
Anish S. Shah [aut, cre, cph] (<https://orcid.org/0000-0002-9729-1558>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.