The Arrow of Time

While other palaeoclimatologists argue whether time should proceed from right to left, or from left to right on a graph, creating confusion when presentations have borrowed graphs in each format, palaeolimnologists have time running upwards. The standard palaeolimnological graphs resemble that of a sediment core: oldest at the bottom, youngest at the top.

Palaeolimnologists usually organise their data in the same format, with the youngest samples at the top of the spreadsheet, and the oldest at the bottom. There are traps for the unwary with this reverse chronological representation.

Archaeologists hold the heretical view that as the oldest things happened first, they should be presented first, and as the radiocarbon calibration program OxCal was designed by archaeologists it expects dates in a sequence to be in chronological order. If you enter the dates in reverse chronological order into an OxCal sedimentation model, such as a p-sequence model, the program will merrily churn away for hours before deciding that it cannot find a solution. With the dates in this order, OxCal is trying to find a solution where the uppermost date is older than the lowermost date.

Another trap is with time series models. If you are fortunate enough to have evenly spaced data, or brave enough to trust interpolated data, it is easy to take column x from the data.frame df containing the data and run arima(df$x, order=c(0,1,1)). ARIMA expects the data to be in chronological order, so if the data.frame is in reverse chronological order the model will not be fitted correctly, but there will not be any warning. Only a close comparison of the fitted model with the raw data will show that the phase relationship is the opposite to that expected. The solution is either to sort the data.frame into chronological order, or less conveniently, run arima(rev(df$x), order=c(0,1,1)), and then remember that the residuals etc will be in the opposite order to the data.frame.

exponential smoothing

x<-arima.sim(list(ar=.7, 1, ma=.5), n=100)#100 simulate data points from an ARIMA model
mx<-arima(x, c(0,1,1)) # fit an ARIMA model to the simulation
mx2<-arima(rev(x), c(0,1,1))#data in reverse chronological order

x11(5,5);par(mar=c(3,3,1,1), mgp=c(1.5,.5,0))
plot(x, xlab="Time", ylab="Value")
lines(x-resid(mx), col=4)
lines(x-rev(resid(mx2)), col=2)
legend("bottomleft", legend=c("Data", "Fitted model", "Reverse Chronological model"), lty=1, col=c(1,4,2), bty="n", cex=.7)

In this plot, the black line is some simulated data. The blue line is an exponential smooth of the data fitted with ARIMA(0,1,1) to the data in chronological order. There is a small lag between the data and the smooth. The red line is an exponential smooth of the data fitted in reverse chronological order. This incorrectly-fitted smooth slightly precedes the data.

One can only hope that nobody would base a ground-breaking paper on the results of an ARIMA fitted to reverse chronological order data.


About richard telford

Ecologist with interests in quantitative methods and palaeoenvironments
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s