Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Similarity of trends in time series analysis

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?

like image 936
A.Amidi Avatar asked Dec 12 '12 08:12

A.Amidi


People also ask

What are some similarity measures which can be used with time series data?

In order to measure the similarity of two matrix-like time series, two matrix matching algorithms, grid representation and matrix-based Euclidean distance (GMED) and grid representation and matrix-based dynamic time warping (GMDTW), are presented.

How do you find the similarity between two time series?

When treating time series, the similarity between two sequences of the same length can be calculated by summing the ordered point-to-point distance between them (Fig. 3). In this sense, the most used distance function is the Euclidean Distance [13], corresponding to the second degree of general L p -norm [41].

What is trend in time series analysis?

Definition: The trend is the component of a time series that represents variations of low frequency in a time series, the high and medium frequency fluctuations having been filtered out.

What is the difference between trend analysis and time series analysis?

In time series data, variations can occur sporadically throughout the data: Functional analysis can pick out the patterns and relationships within the data to identify notable events. Trend analysis means determining consistent movement in a certain direction.


1 Answers

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.

like image 154
Ram Narasimhan Avatar answered Nov 24 '22 14:11

Ram Narasimhan