Similarity of trends in time series analysis

A.Amidi picture A.Amidi · Dec 12, 2012 · Viewed 8.5k times · Source

I am new in time series analysis. I am trying to find the trend of a short (1 day) temperature time series and tried to different approximations. Moreover, sampling frequency is 2 minute. The data were collocated for different stations. And I will compare different trends to see whether they are similar or not.

I am facing three challenges in doing this:

Q1 - How I can extract the pattern?

Q2 - How I can quantify the trend since I will compare trends belong to two different places?

Q3 - When can I say two trends are similar or not similar?

Answer

Ram Narasimhan picture Ram Narasimhan · Dec 12, 2012

Q1 -How I can extract the pattern?

You would start by performing time series analysis on both your data sets. You will need a statistical library to do the tests and comparisons.

If you can use Python, pandas is a good option.

In R, the forecast package is great. Start by running ets on both data sets.

Q2 - How I can quantify the trend since I will compare trends belong to two different places?

The idea behind quantifying trend is to start by looking for a (linear) trend line. All stats packages can assist with this. For example, if you are assuming a linear trend, then the line that minimizes the squared deviation from your data points.

The Wikipedia article on trend estimation is quite accessible. Also, keep in mind that trend can be linear, exponential or damped. Different trending parameters can be tried to take care of these.

Q3 - When can I say two trends are similar or not similar?

  1. Run ARIMA on both data sets. (The basic idea here is to see if the same set of parameters (which make up the ARIMA model) can describe both your temp time series. If you run auto.arima() in forecast (R), then it will select the parameters p,d,q for your data, a great convenience.

  2. Another thought is to perform a 2-sample t-test of both your series and check the p-value for significance. (Caveat: I am not a statistician, so I am not sure if there is any theory against doing this for time series.)

  3. While researching I came across the Granger Test – where the basic idea is to see if one time series can help in forecasting another. Seems very applicable to your case.

So these are just a few things to get you started. Hope that helps.