We have some time series

x <- cumsum(rnorm(100)) 

How to use the fourier transform fft()
you can calculate the amplitude, phase, and frequency of the time series х

  • Ah ... Have you read how to interpret Fourier results? - MBo
  • No, honestly, I know little about it. I need to cluster a series according to some characteristics, I think that the frequencies and amplitudes of the harmonics of the series will work well for this - mr.T

1 answer 1

There is no particular problem with performing the Fourier transform with R tools. Well, for example:

https://cran.r-project.org/web/packages/spectral/spectral.pdf

http://www.di.fc.ul.pt/~jpn/r/fourier/fourier.html

https://stat.ethz.ch/R-manual/R-devel/library/stats/html/fft.html

https://stackoverflow.com/questions/14010605/fast-fourier-transform-in-r

etc. But this will only help you in the task of clustering time series - a separate question. In general, the "clustering of time series" is in itself a separate and very non-trivial (as it seems at first glance) topic.