Hello I am working with sequential data . Is there any existing R library or code that would help to determine (or provide the results of statistical tests for) the most significant or appropriate order of a Markov chain, given a sequence of discrete states? For example, given a sequence of discrete states the code would provide outcome of statistical tests (e.g., p-values) when testing the order of the chain similar to: order p-value 1st 0.07 2nd 0.02 3rd 0.03 4th 0.03 5th 0.00 -- Regards, Akshay Chougule College of Public Health University of Arizona [[alternative HTML version deleted]]