bispectrum | R Documentation |
Estimate bispectrum from real- or complex-valued time series data.
bispectrum(
data,
window_function = NULL,
mc = FALSE,
mc_cores = getOption("mc.cores", 2L)
)
data |
Given time series, as a data frame or matrix with which columns correspond to sampled stretches. |
window_function |
A window function's name for tapering. Defaults to
Currently the following window functions are available: Hamming window ("hamming"), Hann window ("hann"), and Blackman window ("blackman"). |
mc |
If |
mc_cores |
The number of cores in use for parallel computation, passed
|
A data frame including the following columns:
The first elements of frequency pairs.
The second elements of frequency pairs.
The estimated bispectrum at each frequency pair.
Brillinger, D.R. and Irizarry, R.A. "An investigation of the second- and higher-order spectra of music." Signal Processing, Volume 65, Issue 2, 30 March 1998, Pages 161-179.
f <- function(x) {
sin(2 * x) + sin(3 * x + 1) + sin(2 * x) * sin(3 * x + 1)
}
v <- sapply(seq_len(1280), f) + rnorm(1280)
m <- matrix(v, nrow = 128)
bs1 <- bispectrum(m)
bs2 <- bispectrum(m, "hamming")
bs3 <- bispectrum(m, "blackman", mc = TRUE, mc_cores = 1L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.