pergram {growth} | R Documentation |
Calculate and Plot a Periodogram
Description
pergram
calculates the values of a periodogram, plot.pergram
plots it, and plot.cum.pergram
plots the corresponding cumulative
periodogram.
Usage
pergram(y)
## S3 method for class 'pergram'
plot(x, add = FALSE, lty = 1, xlab = "Frequency",
ylab = "Periodogram", main = "Periodogram", ylim = c(0, max(po[,
2])), ...)
## S3 method for class 'pergram'
plot_cum(x, xlab = "Frequency", ylab = "Periodogram",
main = "Cumulative periodogram", ylim = c(0, max(cpo + 1.358/(a +
0.12 + 0.11/a))), ...)
Arguments
y |
A time series vector. |
x |
Plotting parameters |
add |
If TRUE, adds a new periodogram to an existing plot. |
lty |
Plotting parameters |
xlab |
Plotting parameters |
ylab |
Plotting parameters |
main |
Plotting parameters |
ylim |
Plotting parameters |
... |
Plotting parameters |
Value
pergram
prints and returns a two-column matrix of class,
pergram
, containing the periodogram.
Methods (by generic)
-
plot
: Plot method -
plot_cum
: Plot_cum method
Author(s)
J.K. Lindsey
Examples
y <- rnorm(100)
print(z <- pergram(y))
plot(z)
plot_cum(z)
[Package growth version 1.1.1 Index]