ssections {cosinor2} | R Documentation |
Serial Sections
Description
Performs serial section analysis of rhythmic data and fits non-stationary cosinor models.
Usage
ssections(data, time, period, interval, increment, na.action = na.omit,
alpha = 0.05)
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. |
interval |
Length of an interval (number of timepoints) on which cosinor analyses will be ran. |
increment |
A number indicating for how much timepoints should the interval be displaced throughout the data. Note that the value of the increment cannot be higher than the value of the interval. |
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). |
Details
Cornélissen (2014) describes procedures for rhythmometric analysis of non-stationary data. First, an interval of an user-specified length (I
) is chosen and usual cosinor analysis (i.e. single cosinor or population-mean cosinor) is performed on the interval. The interval is then displaced throughout the data by an user-specified increment (\Delta t
) and cosinor analysis is then performed on the new interval. Intervals can be overlapping (\Delta t
<I) or non-overlapping (\Delta t
=I). A rhythm detection test is also calculated in each interval. After values of cosinor parameters have been obtained for each interval, they and their confidence intervals can be plotted, along with the p-values from the rhythm detection test.
Value
Object of the Serial sections
class containing the following objects:
coefficients |
Cosinor coefficients in each of the intervals. |
emp.mean |
Empirical mean of the data across all timepoints. |
p-values |
p-values from the rhythm detection test in each interval. |
cosinors |
A list containing all cosinor objects calculated in each interval. |
plots |
Stacked plots showing the empirical data, cosinor parameters and their confidence intervals, p-values of the rhythm detection test and number of measurements across time. |
Note
The value of increment cannot be higher than the value of the interval.
References
Cornélissen, G. (2014). Cosinor-Based Rhythmometry. Theoretical Biology and Medical Modeling, 11, Article 16.
Examples
ssections(data = PANAS_november, time = PANAS_time, period = 7,
interval = 7, increment = 1)