simulate.mm function

Simulates k-th order Markov chains