[R] Odp: Help with 'spectrum'
ssefick at gmail.com
Fri Sep 12 17:02:31 CEST 2008
1/(x-axis value) = frequency in time
(the x-axis is in cycles per time)
2008/9/12 Petr PIKAL <petr.pikal at precheza.cz>:
> 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
> 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
>> 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.
>  0.09166667
>  10.90909
> 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.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Southeastern Natural Sciences Academy
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.
More information about the R-help