[R] Odp: Help with 'spectrum'
petr.pikal at precheza.cz
Fri Sep 12 15:34:17 CEST 2008
r-help-bounces at r-project.org napsal dne 09.09.2008 18:44:34:
> For the command 'spectrum' I read:
> The spectrum here is defined with scaling 1/frequency(x), following
> This makes the spectral density a density over the range
> +frequency(x)/2], whereas a more common scaling is 2π and range (-0.5,
> (e.g., Bloomfield) or 1 and range (-π, π].
> Forgive my ignorance but I am having a hard time interpreting this. Does
> mean that in the spectrum output every element of the $spec array is
> 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
> I input a 'frequency' of 365 (which in my mind is the period). On the
> of 'spectrum' would this mean that every element of the $spec array is
> 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
> output from 'spectrum' is .1 am I to assume that the period is 36.5 and
> corresponding sin wave would be sin(2 * pi * 36.5/365)?
Well, although I am not an expert in this matter I try to explain my
humble understanding of spectrum results.
you can see that maximum of spec value is for this time series at freq
0.09 and 1/0.09 is almost eleven. Knowing that sunspots have periodicity
11 years I assume that for each series I can get an information about its
periodicity by 1/freq. E.g. if your series is days 1/freq means period in
> Thank you in advance for helping me clear up some confusion.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help