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

From: Prof Brian Ripley <>
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,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
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