Re: [R] How do I "normalise" a power spectral density analysis?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 31 Jan 2006 - 21:18:43 EST

What's wrong with

z <- spec.pgram(ldeaths, plot = FALSE)
plot(1/z$freq, z$spec, log="y", xlab="period", ylab="power")

?

On Tue, 31 Jan 2006, Tom C Cameron wrote:

> Hi Spencer, yes thanks it does help. In short I have resolved the issue.
>
> In length, not directly, as I have not found a way to ask R to actually
> plot frequency vs. period directly,

That's the 1/x function, so I am sure you can manage that. I presume you want power vs period?

> I have scoured the R help pages and Venebles &
> Ripley but the call to R "spectrum()" or "periodogram()" generates error
> messages if I try to enhance or change the plot!

There is no periodogram() function in R.

> I did find that you can install the library packages "growth" and "rmutil" and
> then use the function "pergram" that gives you the output of the PSD in a
> matrix which I have then transformed to give me the period (1/frequency).

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jan 31 21:24:47 2006

This archive was generated by hypermail 2.1.8 : Wed 01 Feb 2006 - 02:21:46 EST