Estimate Markov Chain Transition Matrix in MATLAB With Different State Sequence Lengths
I'm trying to build the transition matrix for a Markov Chain in MATLAB; I have several different observation sequences (all of varying lengths) and I need to generate the transition matrix using those. Constructing a multi-order Markov chain transition matrix in Matlab shows me how to build a transition matrix with a single observation sequence. How can I construct one using observations of different length? One example can be that one sequence is 1,2,3,4 and another is 4,5,6. Is there any way to do this without having to for loop through all sequences and computing counts? So for Markov