ssections: Serial Sections

Description Usage Arguments Details Value Note References Examples

View source: R/cosinor2.R

Description

Performs serial section analysis of rhythmic data and fits non-stationary cosinor models.

Usage

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

alpha

Significance level for calculating population cosinor parameters confidence intervals. Defaults to .05 (confidence intervals are 5% risk intervals).

Details

Corn<c3><a9>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 (Δ t) and cosinor analysis is then performed on the new interval. Intervals can be overlapping (Δ t<I) or non-overlapping (Δ 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<c3><a9>lissen, G. (2014). Cosinor-Based Rhythmometry. Theoretical Biology and Medical Modeling, 11, Article 16.

Examples

1
2
ssections(data = PANAS_november, time = PANAS_time, period = 7,
interval = 7, increment = 1)

Example output

Loading required package: cosinor
     MESOR Amplitude  Acrophase
1 1.620451 0.3402781 -0.4557437
     MESOR Amplitude  Acrophase
1 1.587965 0.3982017 -0.5797145
     MESOR Amplitude  Acrophase
1 1.507859 0.4052887 -0.1809111
     MESOR Amplitude   Acrophase
1 1.448342 0.5285055 -0.03536664
     MESOR Amplitude Acrophase
1 1.541431  0.394836 -6.117816
     MESOR Amplitude Acrophase
1 1.652325 0.4309404 -5.523842
     MESOR Amplitude Acrophase
1 1.632457 0.3993554 -5.530562
     MESOR Amplitude Acrophase
1 1.611006 0.2972274 -5.270866
     MESOR Amplitude Acrophase
1 1.615804 0.3105482 -5.344239
     MESOR Amplitude Acrophase
1 1.742253 0.1175952 -5.641586
     MESOR Amplitude Acrophase
1 1.668699 0.2243002 -5.923385
     MESOR Amplitude   Acrophase
1 1.628744 0.3097036 -0.01173145
     MESOR Amplitude   Acrophase
1 1.633108 0.2998765 -0.01403355
     MESOR Amplitude  Acrophase
1 1.587389 0.2654353 -0.4164323
     MESOR Amplitude  Acrophase
1 1.582527 0.2637017 -0.3983837
     MESOR  Amplitude Acrophase
1 1.484406 0.09529317 -5.430829
     MESOR Amplitude Acrophase
1 1.291141 0.4839035 -5.067825
     MESOR Amplitude Acrophase
1 1.224621 0.5754962 -5.222073
    MESOR Amplitude Acrophase
1 1.26941 0.5675365 -5.053997
     MESOR Amplitude Acrophase
1 1.266885 0.5648176 -5.072753
     MESOR Amplitude Acrophase
1 1.211507 0.4583492 -5.029324
     MESOR Amplitude Acrophase
1 1.146627  0.444661  -4.77787
     MESOR Amplitude Acrophase
1 1.155386 0.4252496 -4.852908
     MESOR Amplitude Acrophase
1 1.194246 0.3472145 -4.817786
There were 16 warnings (use warnings() to see them)

cosinor2 documentation built on May 1, 2019, 10:25 p.m.