Estimates the best-fitting period using iterative cosinor procedure.
Usage
periodogram(data, time, periods = time, 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. If this vector includes midnight, it should be coded as 24 instead of 0.
periods
A vector containing periods that are to be included in the periodogram. Defaults to the same periods as provided in the vector time.
na.action
Action to be performed on missing values. Defaults to na.omit.
alpha
Significance level for determining if a rhythm with a given period is significant or not. Defaults to .05.
Details
Iterative cosinor procedure is performed as described in Klemfuss & Clopton (1993). Cosinor is performed iteratively with the period (\(\tau\)) increased by 1 in each iteration. Percent Rhythm is calculated in each iteration, which allows for an estimation of the best fitting period. A periodogram can be plotted, which shows Percent Rhythm (coefficient of determination) for each period. On the plot, periods with significant rhythm are shown as a point and periods with insignificant rhythm are shown as a cross.
References
Klemfuss, H. & Clopton, P. L. (1993). Seeking Tau: A Comparison of Six Methods. Journal of Interdisciplinary Cycle Research, 24(1), 1-16.
# NOT RUN {periodogram(data = PANAS_november, time = PANAS_time)
periodogram(data = t(data.frame(temperature_zg$Temperature)), time = temperature_zg$Time)
# }