Hi,
I have a question about the ar function in the stats package, it is a method to
use autoregressive models for time series.
Now I have a time series, which I performed a spectral analysis on. This gives
a spectrum with a quite impressive peak at a certain frequency. The AR1
function I want to use to statistically test if this peak is significant or if
it is produced by so called 'red noise'.
For me it is not very clear how the ar() function works, even with studying the
chapter in the R documentation.
- Should I for example apply the function on the original series or on the
spectral analysis data. If I do the last, then how does R know which
frequencies belong to the spectral densities?
- How can I use the ar coefficient to plot the line of 95% interval?
Thank you for your help.
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.