Methods > Generalized differencing of time series
Generalized differencing of time seriesPurpose To difference time series data prior to correlation. Data required Technically only a single time series of (e.g. species richness, number of geologic formations etc.) as well as the dates (in millions of years) for each value, although in reality you will wish to pick at least two time series so that they can be correlated after differencing. Description Much of palaeontological data can ultimately be expressed or plotted as a time series, i.e. some measure on the y-axis and time on the x-axis. We may further be interested in knowing whether any two time series co-vary, or more specificially whether they are correlated. However, it isn't safe to just correlate time series together as there is a strong danger of false positives (type I errors). This is because time series will often show some form of overall trend (rising/falling) and and so simple correlation will suggest a positive or negative relationship between the two series. This can lead to some spurious conclusions, my favourite example of which is the trends in global tempertaure and number of pirates. Instead workers have employed some form of differencing - i.e. instead of looking at values within time bins, they use the differences between time bins. The simplest form of this is first differencing which uses simply the absolute change from bin-to-bin as a new time series and uses these for correlation instead (use the 'diff' function in R to do this). However, first differencing can go too far the other way as any signal of a real trend in the data can also be removed. A compromise between these two extremes is the generalized differencing approach of McKinney (1990). This approach explicitly incoporates both any trend in the data (using a linear model) and the differences from it. It has already found favour in the literature and is even used by John Alroy (see his ten commandments!). Implementation
1. Install and run R (it's free!). Barrett, P. M., McGowan, A. J. and Page, V. 2009. Dinosaur diversity and the rock record. Proceedings of the Royal Society, London B, 276, 2667-2674. McKinney, M. L., 1990. Classifying and analyzing evolutionary trends. In Evolutionary Trends, McNamara K. J., ed. Belhaven, London, pp. 28-58. |
||
Last updated 7th November 2008. |