Wavelet analysis detects rhythms in time series data. A ‘rhythm’, here, refers to a repeating pattern with a certain amplitude and frequency. The amplitude reflects the size of the signal compared to its baseline, while the frequency describes how often the pattern repeats. Within biology, common interesting frequencies include diurnal and annual rhythms.
Most statistical methods to detect rhythms, such as the Fast Fourier Transform and harmonic regression, can only determine repetition under the assumption that the repeating frequency is similar across the entire time series. Wavelet analysis, in contrast, can detect rhythms not only at a range of frequencies but also at different locations in the time series. This means that it could for example be detected whether diurnal rhythms differ between seasons or change as animals age. Therefore, wavelet analysis is useful when it is expected that the rhythm changes across the time series.
Conceptually, wavelet analysis starts with a mother wavelet, which is a rhythmic signal that reflects a certain form of behavioural repetition. This mother wavelet can be ‘stretched’ into different frequencies, and each such ‘stretch’ is referred to as a daughter wavelet. These daughter wavelets can be wider, for low frequencies (i.e. slow repetitions), or narrower, for high frequencies (i.e. fast repetitions). The daughter wavelets are shifted across the time series, and at each point it is calculated how well the daughter wavelet and the time series correspond; a variable referred to as ‘power’. The power, therefore, reflects the strength of the rhythm at that particular frequency and time point. For more information on the mathematics of wavelet analysis, we refer to Torrence and Compo (1998), Cazelles et al. (2008) and Leise (2015; 2017).
Wavelet analysis can be performed on individual animals, and the range of frequencies to be detected are chosen by the user. By default, wavelet analysis creates visual output, but this output can also be quantified and the significance of the power can be tested. The applications of wavelet analysis are, therefore, quite versatile. In our case, we used it to detect circadian rhythms (i.e. repeating every 24 h) in individual pig feeding behaviour across the growing-finishing phase. Other applications could, for example, be to look at seasonal changes in animal migration across years, or to detect ultradian (i.e. repeating more often than every 24 h) rhythms at different frequencies.