Given a multivariate time series, pdPgram2D
computes a multitapered HPD time-varying periodogram matrix based on
averaging raw Hermitian PSD time-varying periodogram matrices of tapered multivariate time series segments.
pdPgram2D(X, B, tf.grid, method = c("dpss", "hermite"), nw = 3, bias.corr = F)
A list containing two components:
tf.grid
a list with two components corresponding to the rectangular grid of time-frequency points at which the multitaper periodogram is evaluated.
P
a \((d,d,m_1,m_2)\)-dimensional array with m_1 = length(tf.grid$time)
and
m_2 = length(tf.grid$frequency)
corresponding to the (\(d,d\))-dimensional tapered periodogram matrices
evaluated at the time-frequency points in tf.grid
.
an (\(n,d\))-dimensional matrix corresponding to a multivariate time series,
with the d
columns corresponding to the components of the time series.
depending on the argument method
, either the number of orthogonal DPSS or Hermite tapering functions.
By default, B = d
, such that the multitaper periodogram is guaranteed to be positive definite.
a list with two components tf.grid$time
and tf.grid$frequency
specifying the
rectangular grid of time-frequency points at which the multitaper periodogram is evaluated. tf.grid$time
should be a numeric vector of rescaled time points in the range (0,1)
. tf.grid$frequency
should be a numeric
vector of frequency points in the range (0,0.5)
, with 0.5 corresponding to the Nyquist frequency.
the tapering method, either "dpss"
or "hermite"
explained in the Details
section below. Defaults to method = "dpss"
.
a positive numeric value corresponding to the time-bandwidth parameter of the tapering functions,
see also dpss
, defaults to nw = 3
. Both the DPSS and Hermite tapers are
rescaled with the same time-bandwidth parameter.
should an asymptotic bias-correction under the affine-invariant Riemannian metric be applied to
the HPD periodogram matrix? Defaults to FALSE
.
If method = "dpss"
, pdPgram2D
calculates a \((d,d)\)-dimensional multitaper time-varying
periodogram matrix based on sliding \(B\) DPSS (Discrete Prolate Spheroidal Sequence or Slepian) orthogonal tapering functions
as in dpss
applied to the \(d\)-dimensional time series X
. If \(B \ge d\), the
multitaper time-varying periodogram matrix is guaranteed to be positive definite at each time-frequency point in the
grid expand.grid(tf.grid$time, tf.grid$frequency)
. In short, the function pdPgram2D
computes a multitaper
periodogram matrix (as in pdPgram
) in each of a number of non-overlapping time series
segments of X
, with the time series segments centered around the (rescaled) time points in tf.grid$time
.
If method = "hermite"
, the function calculates a multitaper time-varying periodogram matrix replacing the DPSS
tapers by orthogonal Hermite tapering functions as in e.g., BB96pdSpecEst.
In the case of subsequent periodogram matrix denoising in the space of HPD matrices equipped with the
affine-invariant Riemannian metric, one should set bias.corr = T
, thereby correcting for the asymptotic
bias of the periodogram matrix in the manifold of HPD matrices equipped with the affine-invariant metric as explained in
CvS17pdSpecEst and Chapter 3 and 5 of C18pdSpecEst. The pre-smoothed HPD periodogram matrix
(i.e., an initial noisy HPD spectral estimator) can be given as input to the function pdSpecEst2D
to perform
intrinsic wavelet-based time-varying spectral matrix estimation. In this case, set bias.corr = F
(the default) as the
appropriate bias-corrections are applied internally by the function pdSpecEst2D
.
pdPgram
, dpss
## Coefficient matrices
Phi1 <- array(c(0.4, 0, 0, 0.8, rep(0, 4)), dim = c(2, 2, 2))
Phi2 <- array(c(0.8, 0, 0, 0.4, rep(0, 4)), dim = c(2, 2, 2))
Theta <- array(c(0.5, -0.7, 0.6, 0.8, rep(0, 4)), dim = c(2, 2, 2))
Sigma <- matrix(c(1, 0.71, 0.71, 2), nrow = 2)
## Generate piecewise stationary time series
ts.Phi <- function(Phi) rARMA(2^9, 2, Phi, Theta, Sigma)$X
ts <- rbind(ts.Phi(Phi1), ts.Phi(Phi2))
pgram <- pdPgram2D(ts)
Run the code above in your browser using DataLab