Learn R Programming

cosinor2 (version 0.2.1)

correct.acrophase: Acrophase Correction

Description

Corrects the value of the acrophase parameter of the cosinor model, placing it in the appropriate quadrant.

Usage

correct.acrophase(x)

Arguments

x

An object of the cosinor.lm class.

Details

The acrophase parameter of a cosinor model is found by solving an equation with inverse tangent of an expression which contains linearized cosinor parameters. However, multiple numeric entities may result in a same value of tangent and just calculating the inverse tangent may result with the wrong value of the acrophase. This function corrects the acrophase from the cosinor.lm object according to the procedure from Bingham et al. (1982). More specifically, the acrophase is calculated as: $$K + g * arctan \vert\frac{\gamma}{\beta}\vert$$ where values of \(K\) and \(g\) depend on the signs of \(\beta\) and \(\gamma\) and can be derived from the following table:

sign \(\beta\) sign \(\gamma\) K g
+ + 0 -1
+ - -2\(\pi\) 1
- + -\(\pi\) 1

References

Bingham, C., Arbogast, B., Guillaume Corn<U+00E9>lissen, G., Lee, J.K. & Halberg, F. (1982). Inferential Statistical Methods for Estimating and Comparing Cosinor Parameters. Chronobiologia, 9(4), 397-439.

Examples

Run this code
# NOT RUN {
fit.temperature<-cosinor.lm(Temperature~time(Time), period = 24, data = temperature_zg)
correct.acrophase(fit.temperature)
# }

Run the code above in your browser using DataLab