Learn R Programming

timsac (version 1.3.0)

mulspe: Multiple Spectrum

Description

Compute multiple spectrum estimates using Akaike window or Hanning window.

Usage

mulspe(y, lag=NULL, window="Akaike", plot=TRUE, plot.scale=FALSE)

Arguments

y
a multivariate time series with $d$ variables and $n$ observations. ($y[n,d])$
lag
maximum lag. Default is $2 \sqrt{n}$, where $n$ is the number of observations.
window
character string giving the definition of smoothing window. Allowed values are "Akaike" (default) or "Hanning".
plot
logical. If TRUE (default) spectrums are plotted as $(d,d)$ matrix. ll{ Diagonal parts : Auto spectrums for each series. Lower triangular parts : Amplitude spectrums. Upper triangular part : Phase spectrums. }
plot.scale
logical. IF TRUE the common range of the $y$-axis is used.

Value

  • specspectrum smoothing by "window". rl{ Lower triangular parts : Real parts Upper triangular parts : Imaginary parts }
  • stattest statistics.
  • cohsimple coherence by "window".

Details

rlll{ Hanning Window : a1(0)=0.5, a1(1)=a1(-1)=0.25, a1(2)=a1(-2)=0 Akaike Window : a2(0)=0.625, a2(1)=a2(-1)=0.25, a2(2)=a2(-2)=-0.0625 }

References

H.Akaike and T.Nakagawa (1988) Statistical Analysis and Control of Dynamic Systems. Kluwer Academic publishers.

Examples

Run this code
sgnl <- rnorm(1003)
  x <- matrix(0,1000,2)
  x[,1] <- sgnl[4:1003]
  #x[i,2]=0.9*x[i-3,1]+0.2*N(0,1)
  x[,2] <- 0.9*sgnl[1:1000]+0.2*rnorm(1000)
  mulspe(x, 100, "Hanning", plot.scale=TRUE)

Run the code above in your browser using DataLab