[R] Help with 'spectrum'
rkevinburton at charter.net
rkevinburton at charter.net
Tue Sep 9 18:44:34 CEST 2008
For the command 'spectrum' I read:
The spectrum here is defined with scaling 1/frequency(x), following S-PLUS. This makes the spectral density a density over the range (-frequency(x)/2, +frequency(x)/2], whereas a more common scaling is 2π and range (-0.5, 0.5] (e.g., Bloomfield) or 1 and range (-π, π].
Forgive my ignorance but I am having a hard time interpreting this. Does this mean that in the spectrum output every element of the $spec array is scaled by 1/frequency(x)? I am having a hard time determing what is meant by 'frequency'.Say I define a time series for a year with samples for every day. I input a 'frequency' of 365 (which in my mind is the period). On the output of 'spectrum' would this mean that every element of the $spec array is scaled by 1/365? There is a corresponding frequency array on the output from 'spectrum'. If the frequency is 365 and an element in the frequency array output from 'spectrum' is .1 am I to assume that the period is 36.5 and a corresponding sin wave would be sin(2 * pi * 36.5/365)?
Thank you in advance for helping me clear up some confusion.
Kevin
More information about the R-help
mailing list