Greetings,
   I would like to estimate a spectral coherence between
   two timeseries. The stats : spectrum() returns a coh matrix
   which estimates coherence (squared).
   A basic test which from which i expect near-zero coherence:
   x = rnorm(500)
   y = rnorm(500)
   xts = ts(x, frequency = 10)
   yts = ts(y, frequency = 10)
   gxy = spectrum( cbind( xts, yts ) )
   plot( gxy $ freq, gxy $ coh )
   yields a white spectrum of 1. Clearly i'm not using
   this correctly... or i mis-interpret the coh as a cross-spectral
   density estimate of coherence |Gxy|^2/(Gxx Gyy)
   Thanks in advance!
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to