Description Usage Arguments Value Examples
Plot the results of psdcore
against the results of
spec.pgram
1 2 3 4 5 | pgram_compare(x, ...)
## S3 method for class 'amt'
pgram_compare(x, f = NULL, X = NULL, log.freq = TRUE,
db.spec = TRUE, taper = 0.2, ...)
|
x |
a single |
... |
additional parameters (currently unused) |
f |
numeric; the frequency range to plot; optional: if not given the program will show the entire band. |
X |
object used to create |
log.freq |
logical; should frequencies be transformed with |
db.spec |
logical; should the spectrum estimates be converted to decibels with |
taper |
numeric; specifies the proportion of data to taper for the cosine periodogram. |
A list with the cosine-tapered estimates and the adaptive estimates, invisibly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | set.seed(1234)
X <- rnorm(1e3)
# multitaper spectrum
p <- psdcore(X, ntaper=10)
# how does it compare to a single-cosine tapered spectrum?
pgram_compare(p)
# or in a certain band
pgram_compare(p, c(0.1,0.4))
# linear frequencies
pgram_compare(p, c(0.1,0.4), log.freq = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.