cosinor | R Documentation |
Performs a Cosinor test for periodicity on each row/column of the input matrix.
row_cosinor(x, t, period = 24)
col_cosinor(x, t, period = 24)
x |
numeric matrix. |
t |
a vector specifying time variable for each observation of x. |
period |
oscillation period in the units of |
row_cosinor
- cosinor test on rows.
col_cosinor
- cosinor test on columns.
a data.frame where each row contains the results of a cosinor test
performed on the corresponding row/column of x.
Each row contains the following information (in order):
1. obs - total number of observations
2. mesor - "Midline Estimating Statistic Of Rhythm" - the average value around which the variable oscillates
3. amplitude - difference between mesor and the peak of the rhythm
4. acrophase - time when rhythm reaches its peak
5. rsquared - R-squared
6. df.model - model terms degrees of freedom
7. df.residual - residual degrees of freedom
8. statistic - F statistic for the omnibus test against intercept-only model
9. pvalue - p-value
10. period - the period used within the model
Karolis Koncevičius
cosinor.lm
wave <- sin(2*pi*1:24/24) + rnorm(24)
row_cosinor(wave, 1:24, 24)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.