population.cosinor.lm: Population-Mean Cosinor

Description Usage Arguments Details Value Note References Examples

View source: R/cosinor2.R

Description

Calculates the population-mean cosinor.

Usage

1
2
population.cosinor.lm(data, time, period, na.action = na.omit,
  alpha = 0.05, plot = T)

Arguments

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 na.omit.

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 TRUE.

Details

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.

Value

Object of the population.cosinor.lm class containing the following objects:

single.cos

A list of objects containing all performed single cosinors.

pop.mat

A data frame containing the cosinor parameters of each subject in the population.

coefficients

Delinearized population-mean cosinor coefficients.

emp.mean

Empirical mean of the data across all timepoints.

fitted.values

Estimated values of the rhythm caclculated using the cosinor model.

residuals

The difference between empirical mean and the fitted values.

conf.int

Values of upper and lower limits of confidence intervals of delinearized cosinor parameters.

Note

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.

References

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.

Examples

1
2

amutak/cosinor2 documentation built on May 22, 2019, 2:16 p.m.