avpg: Average Periodogram for Multiple (Genetic) Time Series

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

avgp calculates and plots the average periodogram as described in Wichert, Fokianos and Strimmer (2004).

Usage

1
avgp(x, title = deparse(substitute(x)), plot = TRUE, angular = FALSE, ...)

Arguments

x

multiple (genetic) time series data. Each column of this matrix corresponds to a separate variable/time series

title

name of the data set (default is the name of the data object)

plot

plot the average periodogram?

angular

convert frequencies to angular frequencies?

...

arguments passed to plot and to periodogram

Details

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.

Value

A list object with the following components:

freq

A vector with the discrete Fourier frequencies (see periodogram). If the option angular=TRUE then the output are angular frequencies (2*pi*f).

avg.spec

A vector with the average power spectral density at each frequency.

title

Name of the data set underlying the average periodogram.

The result is returned invisibly if plot is true.

Author(s)

Konstantinos Fokianos and Korbinian Strimmer (https://www.strimmerlab.org/).

References

Wichert, S., Fokianos, K., and Strimmer, K. (2004). Identifying periodically expressed transcripts in microarray time series data. Bioinformatics 20:5-20.

See Also

periodogram, spectrum.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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)

Example output

Loading required package: MASS
Loading required package: longitudinal
Loading required package: corpcor
Loading required package: fdrtool
[1]   11 1444
$freq
[1] 0.09090909 0.18181818 0.27272727 0.36363636 0.45454545

$avg.spec
[1] 1.0194294 0.4531051 0.3946281 0.3072837 0.5645783

$title
[1] "Caulobacter"

$freq
[1] 0.09090909 0.18181818 0.27272727 0.36363636 0.45454545

$avg.spec
[1] 1.0194294 0.4531051 0.3946281 0.3072837 0.5645783

$title
[1] "Caulobacter"

GeneCycle documentation built on Jan. 6, 2021, 1:10 a.m.

Related to avpg in GeneCycle...