Description Usage Arguments Details Value Note References Examples
Calculates the population-mean cosinor.
1 2 |
data |
A data frame containing responses of subjects collected over time, with subjects in the rows and timepoints in the columns. |
time |
A vector containing the times at which the data was collected. |
period |
Duration of one cycle of rhythm. |
na.action |
Action to be performed on missing values. Defaults to |
alpha |
Significance level for calculating population cosinor parameters confidence intervals. Defaults to .05 (confidence intervals are 5% risk intervals). |
plot |
Logical, display plot after calculation? Defaults to |
According to the procedure described in Corn<c3><a9>lissen (2014), to calculate population-mean cosinor, single cosinors are first performed on each subject and linearized parameters are averaged, which allows for calculation of delinearized parameters. After such a procedure is completed, confidence intervals of population-mean cosinor parameters can be calculated as described in Bingham et al. (1982) using the following formulae:
\widehat{M} \pm \frac{t_{1-\frac{α}{2}}\widehat{σ}_M}{√{k}}
\widehat{φ}+arctan(\frac{c_{23} t_{1-\frac{α}{2}}^2 \pm t_{1-\frac{α}{2}}√{c_{33}} √{\widehat{A}^2-\frac{(c_{22}c_{33}-c_{23}^2)t_{1-\frac{α}{2}}^2}{c_{33}}}}{\widehat{A}^2 - c_{22} t_{1-\frac{α}{2}}^2})
\widehat{A} \pm t_{1-\frac{α}{2}} √{c_{22}}
where c_{22}, c_{23} and c_{33} are elements of the sampling scheme matrix, calculated as follows:
c_{22}=\frac{\widehat{σ}^2_{β}\widehat{β}^2+2\widehat{σ}_{β γ}\widehat{β}\widehat{γ}+\widehat{σ}^2_{γ}\widehat{γ}^2}{k\widehat{A}^2}
c_{23}=\frac{-(\widehat{σ}^2_{β}-\widehat{σ}^2_{γ})(\widehat{β}\widehat{γ})+\widehat{σ}_{β γ}(\widehat{β}^2-\widehat{γ}^2)}{k\widehat{A}^2}
c_{33}=\frac{\widehat{σ}^2_{β}\widehat{γ}^2-2\widehat{σ}_{β γ}\widehat{β}\widehat{γ}+\widehat{σ}^2_{γ}\widehat{β}^2}{k\widehat{A}^2}
where \widehat{M}, \widehat{A}, \widehat{φ}, \widehat{β} and \widehat{γ} are population-mean cosinor parameters, \widehat{σ}_M, \widehat{σ}_{β} and \widehat{σ}_{γ} are the standard deviations of the single cosinor parameters, \widehat{σ}_{β γ} is the covariance of the single cosinor β and γ coefficients, k is the number of subjects in a population and t_{1-\frac{α}{2}} is the two-tailed inverse of the t-distribution with α level of significance and k - 1 degrees of freedom.
Object of the population.cosinor.lm
class containing the following objects:
|
A list of objects containing all performed single cosinors. |
|
A data frame containing the cosinor parameters of each subject in the population. |
|
Delinearized population-mean cosinor coefficients. |
|
Empirical mean of the data across all timepoints. |
|
Estimated values of the rhythm caclculated using the cosinor model. |
|
The difference between empirical mean and the fitted values. |
|
Values of upper and lower limits of confidence intervals of delinearized cosinor parameters. |
If the confidence interval of the population amplitude includes zero, confidence interval of the acrophase cannot be calculated reliably. If this case occurs while using this function, the user will be warned and acrophase confidence interval limits will be set to NA.
Corn<c3><a9>lissen, G. (2014). Cosinor-Based Rhythmometry. Theoretical Biology and Medical Modeling, 11, Article 16.
Bingham, C., Arbogast, B., Guillaume Corn<c3><a9>lissen, G., Lee, J.K. & Halberg, F. (1982). Inferential Statistical Methods for Estimating and Comparing Cosinor Parameters. Chronobiologia, 9(4), 397-439.
1 2 | population.cosinor.lm(data = PANAS_november, time = PANAS_time,
period = 7, na.action = "na.exclude")
|
Loading required package: cosinor
MESOR Amplitude Acrophase
1 1.435419 0.2662682 -5.544496
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.