Description Usage Arguments Value Author(s) See Also Examples
periodogram
is a wrapper function for spectrum
with some special options set. It
returns the power spectral density, i.e. the
squared modulus of the Fourier coefficient divided by the length
of the series, for multiple time series as well as the corresponding
Fourier frequencies. The frequencies range between
0 and the Nyquist critical frequency fc = frequency
(x)/2.
periodogram
is used by the functions
avgp
and fisher.g.test
.
For general periodogram functions
please refer to spectrum
.
1 | periodogram(x, method = "builtin")
|
x |
vector or matrix containing the time series data (one time series per column) |
method |
a string that specifies which method should be used to
compute the spectral density: "builtin" employs the function
|
A list object with the following components:
spec |
A vector or matrix with the estimated power spectral densities (one column per time series). |
freq |
A vector with frequencies f ranging from 0 to fc
(if the sampling rate |
Konstantinos Fokianos and Korbinian Strimmer (https://www.strimmerlab.org/).
spectrum
, avgp
, fisher.g.test
.
1 2 3 4 5 6 7 8 9 10 11 | # load GeneCycle library
library("GeneCycle")
# load data set
data(caulobacter)
# how many genes and how many samples?
dim(caulobacter)
# periodograms of the first 10 genes
periodogram(caulobacter[,1:10])
|
Loading required package: MASS
Loading required package: longitudinal
Loading required package: corpcor
Loading required package: fdrtool
[1] 11 1444
$spec
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 0.44284739 1.130357356 1.068349960 1.419206295 2.27775109 1.639187395
[2,] 0.17385272 0.115400249 0.104251846 0.130276223 0.20037570 0.274096460
[3,] 0.29355408 0.003969141 0.001325152 0.002410588 0.09710114 0.052439716
[4,] 0.23226646 0.005259707 0.001714942 0.006475784 0.09488164 0.001921288
[5,] 0.01466026 0.010919571 0.003348493 0.002697767 0.06143642 0.006730472
[,7] [,8] [,9] [,10]
[1,] 0.0023735707 2.019760704 0.075547591 0.9021377
[2,] 0.0078230143 0.134738578 0.018713563 0.5507906
[3,] 0.0199583163 0.017368141 0.029188321 0.2945531
[4,] 0.2256001470 0.003061959 0.002084201 0.3577172
[5,] 0.0005818419 0.014593731 0.029949666 0.2678070
$freq
[1] 0.09090909 0.18181818 0.27272727 0.36363636 0.45454545
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.