Calculates the population-mean cosinor.
population.cosinor.lm(data, time, period, na.action = na.omit,
alpha = 0.05, plot = T)A data frame containing responses of subjects collected over time, with subjects in the rows and timepoints in the columns.
A vector containing the times at which the data was collected.
Duration of one cycle of rhythm.
Action to be performed on missing values. Defaults to na.omit.
Significance level for calculating population cosinor parameters confidence intervals. Defaults to .05 (confidence intervals are 5% risk intervals).
Logical, display plot after calculation? Defaults to TRUE.
Object of the population.cosinor.lm class containing the following objects:
single.cosA list of objects containing all performed single cosinors.
pop.matA data frame containing the cosinor parameters of each subject in the population.
coefficientsDelinearized population-mean cosinor coefficients.
emp.meanEmpirical mean of the data across all timepoints.
fitted.valuesEstimated values of the rhythm caclculated using the cosinor model.
residualsThe difference between empirical mean and the fitted values.
conf.intValues of upper and lower limits of confidence intervals of delinearized cosinor parameters.
According to the procedure described in Corn<U+00E9>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{\alpha}{2}}\widehat{\sigma}_M}{\sqrt{k}}$$ $$\widehat{\phi}+arctan(\frac{c_{23} t_{1-\frac{\alpha}{2}}^2 \pm t_{1-\frac{\alpha}{2}}\sqrt{c_{33}} \sqrt{\widehat{A}^2-\frac{(c_{22}c_{33}-c_{23}^2)t_{1-\frac{\alpha}{2}}^2}{c_{33}}}}{\widehat{A}^2 - c_{22} t_{1-\frac{\alpha}{2}}^2})$$ $$\widehat{A} \pm t_{1-\frac{\alpha}{2}} \sqrt{c_{22}}$$ where \(c_{22}\), \(c_{23}\) and \(c_{33}\) are elements of the sampling scheme matrix, calculated as follows: $$c_{22}=\frac{\widehat{\sigma}^2_{\beta}\widehat{\beta}^2+2\widehat{\sigma}_{\beta \gamma}\widehat{\beta}\widehat{\gamma}+\widehat{\sigma}^2_{\gamma}\widehat{\gamma}^2}{k\widehat{A}^2}$$ $$c_{23}=\frac{-(\widehat{\sigma}^2_{\beta}-\widehat{\sigma}^2_{\gamma})(\widehat{\beta}\widehat{\gamma})+\widehat{\sigma}_{\beta \gamma}(\widehat{\beta}^2-\widehat{\gamma}^2)}{k\widehat{A}^2}$$ $$c_{33}=\frac{\widehat{\sigma}^2_{\beta}\widehat{\gamma}^2-2\widehat{\sigma}_{\beta \gamma}\widehat{\beta}\widehat{\gamma}+\widehat{\sigma}^2_{\gamma}\widehat{\beta}^2}{k\widehat{A}^2}$$ where \(\widehat{M}\), \(\widehat{A}\), \(\widehat{\phi}\), \(\widehat{\beta}\) and \(\widehat{\gamma}\) are population-mean cosinor parameters, \(\widehat{\sigma}_M\), \(\widehat{\sigma}_{\beta}\) and \(\widehat{\sigma}_{\gamma}\) are the standard deviations of the single cosinor parameters, \(\widehat{\sigma}_{\beta \gamma}\) is the covariance of the single cosinor \(\beta\) and \(\gamma\) coefficients, \(k\) is the number of subjects in a population and \(t_{1-\frac{\alpha}{2}}\) is the two-tailed inverse of the t-distribution with \(\alpha\) level of significance and \(k - 1\) degrees of freedom.
Corn<U+00E9>lissen, G. (2014). Cosinor-Based Rhythmometry. Theoretical Biology and Medical Modeling, 11, Article 16.
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.
# NOT RUN {
population.cosinor.lm(data = PANAS_november, time = PANAS_time,
period = 7, na.action = "na.exclude")
# }
Run the code above in your browser using DataLab