I have a time series of hourly measurements for a duration of one year:

time <- 1:(365*24)/24
x <- rnorm(length(time))

The measurements are taken at hourly intervals. The main periodicity for the time series is that of a diurnal cycle i.e. the temperature follows a daily pattern. However, I would like to show that the 'power' of this expected frequency varies in time, i.e. being greater during some days in comparison to others. To achieve this I was thinking of running a window over the time series, computing a periodogram for each day (i.e. each 24 rows) showing that the periodicity of 1/24 explains less of the variation in the data during certain times of the year. I am new to R so have a rather basic knowledge of how to produce a script for this.

  • $\begingroup$ I'm not sure about the moving periodogram, but this sounds like a job suited to a wavelet analysis. The biwavelet package can do this for you (amongst others; this is just the one I have used). $\endgroup$ – Gavin Simpson Aug 13 '12 at 12:15
  • $\begingroup$ I dont know, wavelets seem to blur the results, I want to look at a specific frequency, wavelets will show me all of the periodicities that make up the signal. $\endgroup$ – user13252 Aug 13 '12 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.