$names
 [1] "freq"      "spec"      "coh"       "phase"     "kernel"    "df"
 [7] "bandwidth" "n.used"    "orig.n"    "series"    "snames"    "method"
[13] "taper"     "pad"       "detrend"   "demean"

$freq and $spec are used to plot the power spectrum.  freq is the x-axis and
spec is the y-axis.  $coh is the squared coherency between the two signals
in your case and I believe that this is also plotted against frequency.
This is your "correlation" strength.  Phase I haven't been able to figure
out- I think that it is some sort of estimator for the phase shift.  to get
either phase or coherency plot add the plot.type argument to your plot
command

x <- spectrum(yourdata, log="no") #this will plot it without a log scale I
find it useful to look at both the no log plot and then the logscale plot
(just remove the log="no")

plot(x, plot.type="marginal")  #this is the default type (the powerspectrum)
plot(x, plot.type="phase")
plot(x, plot.type="coherency")

also just look at

?spectrum
schumway is a good book - I think it is something like time series analysis
with examples in R

hope this helps

stephen


On Tue, Apr 29, 2008 at 8:54 PM, Maura E Monville <[EMAIL PROTECTED]>
wrote:

> I am reading some documentation about Cross Spectrum Analysis as a
> technique
> to compare spectra.
> My understanding is  that it estimates the correlation strength between
> quasi-periodic structures embedded in two signals. I believe it may be
> useful for my signals  analysis.
>
> I was referred to the R  functions that  implement this type of analysis.
> I
> tried all the examples which generated a series of fancy plots. But  I
> need
> to work on the numerical results.
>
> I have read that the following info is available through Cross Spectra
> analysis:
> *Cross-periodogram, Cross-Density, Quadrature-density, Cross-amplitude,
> Squared
> Coherency, Gain, and Phase Shift*
> I went through a couple of the two-series (bivariate) cross-spectrum
> analysis examples with R.
> I also printed out the attributes of the analysis (see the following). I
> cannot quite match the above quantities with the attributes/features
> output
> of cross-spectra analysis with R.
> I would greatly appreciate some explanation (which is what) and seeing
> some
> more worked out examples.
>
> > attributes(mfdeaths.spc)
> $names
>  [1] "freq"      "spec"      "coh"       "phase"     "kernel"    "df"
>  [7] "bandwidth" "n.used"    "orig.n"    "series"    "snames"    "method"
> [13] "taper"     "pad"       "detrend"   "demean"
>
> $class
> [1] "spec"
>
>
> Thank you so much.
>
> Yours Faithfully,
> --
> Maura E.M
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
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

        [[alternative HTML version deleted]]

______________________________________________
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