Skip to content

Comparing Time Series

6 messages · Brian Ripley, nathan3073, Gabor Grothendieck +1 more

#
Dear All,
I need to compare hundreds (about 200-300) of time series. Would anyone tell
me how to do this in R? If R has no package for doing this, can I get some
insight what method I should use?

best regards,
Nathanael Gratias
#
Surely you need the insight before choosing a package?

What is the problem you are trying to solve?  There are many different 
aspects of time series which could be of interest, and we have no idea 
which are relevant to your problem.
On Sun, 30 Mar 2008, nathan3073 wrote:

            

  
    
#
It is a reaction time experiment. My program will display 25 circles,
arranged in a 5x5 square. The program will light one circle at a time, which
the subject should click ASAP. The time interval between two lighting is
1.5s. If the subject fails to click in approriate time, the data will be
considered missing.

The one I want to explore is the relationship between intellegence and the
ability to recognize visual stimuli regularity. I arrange the experiment so
there will be 4 repeated pattern. At last, after all pattern have been
displayed, my program will light the circle randomly.

I want to check the time series plots, in order to clarify my hypothesis
that the 'smart' and the 'average' deal with stimuli in a different way. For
example, because of 'smart' people is known to be able to recognize
regularity faster, we may expect their plot to decline quite rapidly. But,
because of their automation, we may also expect that they will find some
difficulties to adapt when the pattern has changed. The adaptation
difficulty may be represented (hopefully) by an increasing reaction time.

I think to check every subject's plot, and determine their ARIMA(p,d,q)
model. Then, if they all follow same ARIMA model, obviously my hypothesis is
wrong, and I may conclude that there are no differences in the way subject
deal with stimuli. But, if let's say 20 subject follow ARIMA(1,0,1) and the
others follow ARIMA(0,0,2) I can say that there are differences in the
subject's cognitive ability for dealing with stimuli. For now, I set aside
what the differences is and its psychological explanation.

The problem is, it will be very frustating to have 200 subjects and
determine approriate ARIMA model for each plot. So, there're only 2 ways
left. One, I reduce the number of subjects to manageable quantity, let's say
30 subjects. Or two, I know method(s) that make me possible to analyze
multiple time series plot, and say whether they follow same or different
model.

Thank you,
regards,
Nathanael

PS: please forgive grammatical error
Prof Brian Ripley wrote:

  
    
#
You could look at the dtw package.  If x and y are two time series,
dtw(x, y)$distance returns the distance between them in the sense
discussed in the package.
On Mon, Mar 31, 2008 at 8:37 AM, nathan3073 <nathan.3073 at gmail.com> wrote:
#
Hai Ingmar,
nice to see you again.
well, I consider time series as the most important aspect in my experiment.
ANOVA can only show whether the mean are different, and combined with Turkey
HSD, the greatest they can do is showing the difference for each pair of
subject. Time Series in other side, can give  whether the smart has real
difference with the average, in term of their cognitive process. Their
learning time, their capability to adapt their mental representation when
dealing with new pattern or regularity. They can all be plotted and we can
check it.

Of course by the plot alone, we can say something meaningfull. But, the
conclusion is more subjective than objective and is not as strong as
statistical approach.

Anyway, my hypothesis for this is the subject follow different models. I
don't care if the model being followed are ARIMA(1,2,0) with AR(2); or AR(2)
and MA(1). I just want to know if the models are different. So far, the only
way I have is checking their model one by one. I'm curious if there is
another way to check the hypothesis


best regards,
Nathanael
Ingmar Visser wrote: