# How to compare two time series?

I have collected temperature readings for 4 locations on a beach in Cornwall UK using data loggers. The loggers recorded temperature every 15 mins accurate to .1 of a degree (Celsius). The loggers collected data for 10 days with a one day break to calibrate the sensors. In total I used 30 sensors with 6-7 sensors in each position.

I have now downloaded the data and have produced time-series for temperature over the 10 day period. Visual inspection of the time-series shows how the temperature changes with tides and night and day. I want to investigate whether the time-series differ significantly from one another. Please could someone point me in the direction of a technique to do this in SPSS?

• I think there are a number of questions similar to this on the site already (try this search eg). Have you read through those & still have a question? If so, could you edit your Q to clarify what you still need to know? Note that, if this Q is only about how to get this done in SPSS, it is probably off-topic for CV (you may want to check out our FAQ on that issue). – gung - Reinstate Monica Aug 26 '12 at 16:12

## 2 Answers

To compare two time series simply estimate the COMMON appropriate arima model for each time series separately AND then estimate it globally ( putting the second series behind the first ) . Make sure that your software recognizes the beginning of the scond series and doesn't forecast it from the latter values of the first series. Perform an F test ala G. Chow to test the hypothesis of a common set of parameters. AUTOBOX , a program that I am involved with allows this test to be performed. SPSS may not.

I don’t know if you have used “Time Series Modeler” in "SPSS Forecasting" or not. But If you did, then you can obtain different statistics including Goodness-of-fit measures: stationary R-square, R-square (R2), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), maximum absolute error (MaxAE), maximum absolute percentage error (MaxAPE), normalized Bayesian information criterion (BIC) as referenced here, page 4.

You can use these statistics to compare your models. To do so, from the menus choose -> Analyze -> Forecasting -> Create Models... (after selecting variables and methods) -> “statistics” tab.

• To formally test the hypothesis of a common set of parameters , you need to estimate under under the null hypothesis of no differences . Simple comparisons as you laid out simply are not formal enough. – IrishStat Jan 25 '13 at 19:24