# Markov model for time series, going back n periods?

I realise there are a lot of questions about markov here, but as we say in Dutch, I couldn't see the threes through the forest.

I have a sequence of intervals between subsequent notes (pitches).

Like: 2 -3 -1 0 2 3 etc

I suspect that the next interval is not only dependant on the previous interval, but let's say, dependant on the previous two intervals. (Later on, I might also look at intervals that occur at the same time, so other voices).

Is Markov still appropriate for this? Or more specifically hidden markov right? Or should I use some totally different approach?

How would I go about this? I can't just summarise occurances of intervals to create the TM. Should I create a fake attribute that would be two subsequent intervals? Is there some software that could help me do this easily? I have the book on R, so I could delve into that. But i wanted to be sure about my approach and possible easier solutions before I look into that in more detail.

I am also reading this very interesting intro, but my brain wanted a plain and simple explanation before going too deep into mathematics.

• Should I group together the last say 3 items and look at them as 1 n-gram or something? Feb 27, 2014 at 12:48