Re: [R] Identify period length of time series automatically?

From: Mike Marchywka <>
Date: Thu, 14 Apr 2011 05:57:31 -0400

> Date: Thu, 14 Apr 2011 11:29:23 +0200
> From:
> To:
> Subject: [R] Identify period length of time series automatically?
> Hash: SHA1
> Hi
> I have 10.000 simulations for a sensitivity analysis. I have done a few
> sensitivity analysis for different response variables already,
> but now, as most of the simulations (if not all) show some cyclic
> behaviour, see how the independent input parameter influence the
> frequency of the cyclic changes and "how cyclic" they actually are.
> So effectively, I have 39 values, and I want to identify automatically
> the frequency / period length of the series and a kind of a measure on
> "how cyclic" the series is.

Probably google "Digital Signal Processing" or Fourier transform.
>From this, you resolve your time series into sinusoids of various components
and you can separate peaks in line spectra from background noise. Depending on what you consider to be "cyclic" the analysis details will vary. If you look at things like amplitude and frequncy modulation of one sine wave with another and various relationships between carrier and modulation frequency, you can get some ideas of what to look for in spectra.

Alternatively, you can try to define exactly what you mean by "cyclic" and maybe make a better transform that discriminates that from acyclic but offhand I would suggest FFT and various tests on the spectra.

Just off hand I'm not sure that 39 points would be a lot to go on but you can simulate some examples in R quite easily if you know what the data looks like in various cases you think may exist.

> How can I do that automatically without individual checking? I do not
> want to do an eyeball assessment for 10.000 time series....
> Thanks,
> Rainer
> - --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
                                          mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 14 Apr 2011 - 15:35:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Apr 2011 - 15:40:31 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive