[R] Cross Spectrum Analysis

David Winsemius dwinsemius at comcast.net
Thu Sep 2 08:01:37 CEST 2010


On Sep 2, 2010, at 1:00 AM, aftar wrote:

>
> Hi
>
> Is anyone know how could I find the cross spectrum?
>
> from the spectrum function, it only give the spectrum for each  
> individual
> series.

I read the manual very differently. It is telling me that you _do_ get  
cross spectrum results in the "coh" matrix:

"VALUE
coh    NULL for univariate series. For multivariate time series, a  
matrix containing the squared coherency between different series.  
Column i + (j - 1) * (j - 2)/2 of coh contains the squared coherency  
between columns i and j ofx, where i < j."

And there is a link on that help page to a help page that includes the  
plot.spec.coherency function.

This response from Prof Ripley (very easily found on an RSiteSearch  
search for "cross spectrum") has a further link to a supplement to V&R4:
http://finzi.psych.upenn.edu/Rhelp10/2009-November/219526.html

http://www.stats.ox.ac.uk/pub/MASS4/VR4stat.pdf

... which discusses coherency and illustrates processing of the "coh"  
object.
-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list