avgp
calculates and plots the average periodogram as described in
Wichert, Fokianos and Strimmer (2004).
avgp(x, title = deparse(substitute(x)), plot = TRUE, angular = FALSE, ...)
A list object with the following components:
A vector with the discrete Fourier frequencies (see periodogram
).
If the option angular=TRUE then the output are angular frequencies (2*pi*f).
A vector with the average power spectral density at each frequency.
Name of the data set underlying the average periodogram.
The result is returned invisibly if plot
is true.
multiple (genetic) time series data. Each column of this matrix corresponds to a separate variable/time series
name of the data set (default is the name of the data object)
plot the average periodogram?
convert frequencies to angular frequencies?
arguments passed to plot
and to periodogram
Konstantinos Fokianos and Korbinian Strimmer (https://strimmerlab.github.io/).
The average periodogram is simply the frequency-wise average of the spectral density (as estimated
by the Fourier transform) over all times series.
To calculate the average periodogram the function periodogram
is used. See Wichert, Fokianos and Strimmer (2004)
for more details.
Wichert, S., Fokianos, K., and Strimmer, K. (2004). Identifying periodically expressed transcripts in microarray time series data. Bioinformatics 20:5-20.
periodogram
, spectrum
.
# load GeneCycle library
library("GeneCycle")
# load data set
data(caulobacter)
# how many samples and how many genes?
dim(caulobacter)
# average periodogram
avgp.caulobacter <- avgp(caulobacter, "Caulobacter")
avgp.caulobacter
# just compute and don't plot
avgp(caulobacter, "Caulobacter", plot=FALSE)
Run the code above in your browser using DataLab