On Apr 9, 2012, at 16:55 , Uwe Ligges wrote:

> 
> 
> On 08.04.2012 20:39, Bazman76 wrote:
>> Hi there,
>> 
>> Can someone explain what the difference between spec.pgram and spec.ar is?
>> 
>> I understand that they attempt to do the same thing one using an AR
>> estimation of the underlying series to estimate teh sensity the other using
>> the FFT. However when applied to teh same data set they seem to be giving
>> quite different results?
>> 
>> http://r.789695.n4.nabble.com/file/n4541358/R_example.jpg
>> 
>> 
>> Clearly the spec.ar() result seems to be smoothed but the results are also
>> generally very different only really sharing the peak as the frequencies go
>> towards zero.
>> 
>> Can someone please explain why these two functions produce such different
>> results on the same data set?
> 
> Because they really measure different things? Why do you expect to get the 
> same output in time as well as in frequency domain?


That wasn't the question.... There is a raw series and two spectra, and it is 
the difference between the latter that is remarkable. Offhand, this is of 
course a bit like comparing a model fit to a nonparametric smoother of ordinary 
measurements: Sometimes the data just do something that the model says that 
they can't do and you get huge discrepancies. So the first reaction must be 
that an autoregressive model is just wrong for these data. My second reaction 
would be that the original series look a bit like they might have an asymmetric 
distribution, so perhaps a log or a square root transformation is warranted. 

That being said, I'm still quite stumped trying to explain the pattern in the 
raw periodogram. Notice that what you are seeing is not so much an initial peak 
as a region in which the spectrum drops effectively to zero. Have the data by 
any chance been subject to some sort of preprocessing that removes 
low-frequency components?

At any rate, this isn't really about R, is it?

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to