spectral.density {freqdom} | R Documentation |
Compute empirical spectral density
Description
Estimates the spectral density and cross spectral density of vector time series.
Usage
spectral.density(
X,
Y = X,
freq = (-1000:1000/1000) * pi,
q = max(1, floor(dim(X)[1]^(1/3))),
weights = c("Bartlett", "trunc", "Tukey", "Parzen", "Bohman", "Daniell",
"ParzenCogburnDavis")
)
Arguments
X |
a vector or a vector time series given in matrix form. Each row corresponds to a timepoint. |
Y |
a vector or vector time series given in matrix form. Each row corresponds to a timepoint. |
freq |
a vector containing frequencies in |
q |
window size for the kernel estimator, i.e. a positive integer. |
weights |
kernel used in the spectral smoothing. By default the Bartlett kernel is chosen. |
Details
Let be a
matrix and
be a
matrix. We stack the vectors and assume that
is a stationary multivariate time series of dimension
. The cross-spectral density between the two time series
and
is defined as
The function spectral.density
determines the empirical cross-spectral density between the two time series and
. The estimator is of form
with defined in
cov.structure
Here is a kernel of the specified type and
is the window size. By default the Bartlett kernel
is used.
See, e.g., Chapter 10 and 11 in Brockwell and Davis (1991) for details.
Value
Returns an object of class freqdom
. The list is containing the following components:
-
operators
an array. The
-th matrix in this array corresponds to the spectral density matrix evaluated at the
-th frequency listed in
freq
. -
freq
returns argument vector
freq
.
References
Peter J. Brockwell and Richard A. Davis Time Series: Theory and Methods Springer Series in Statistics, 2009