[R] coherency and phase plots

stephen sefick ssefick at gmail.com
Tue Jan 29 19:35:14 CET 2008


I am having a hard time interpreting the phase and coherency plots.
x is two timeseries that occur at the same time   i.e.

          a       b
1       11.2   12.3
16     11.3   12.4
31     11.4   12.5
46     11.5   12.6
...etc

even though my example is does not show this they are oscillating at
more or less the same frequency just shifted by t=x (imagine two sine
waves offset with the 2nd sine wave starting at the peak of the
first).  I would like to know what x is.  I think I am looking for the
phase shift?  The coherency?  Cross-spectrum?  And I have read the
help files,  Shumway and Stoffer has a small section on this, I don't
have journal access,  and I am having trouble finding anything on the
internet.

s = spec.pgram(x)
par(mfrow = c(2,1))
plot(s, plot.type = "coh")
plot(s, plot.type = "pha")

Can R do the cross-spectrum of two timeseries?  How?


-- 
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

								-K. Mullis



More information about the R-help mailing list