This function allows you to estimate transition matrices (probabilities or counts) for up-to-fifth-order discrete Markov chains. For n-order Markov chains with n greater than 1, you can access the estimated transition matrices through nested lists.

1 | ```
TransMatrix(sequence, order = 1, probs = TRUE)
``` |

`sequence` |
A vector of integers representing the sequence. The sequence must be in the form of 1,2,3,... |

`order` |
Integer from 1 to 5. Order of the Markov chain. By default is set to 1. |

`probs` |
Logical. If TRUE probability matrices are returned, otherwise count matrices are returned. By default is set to TRUE. |

1 2 3 4 5 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.