simulateMarkovChain {epigraHMM} | R Documentation |
Simulates a Markov Chain of length 'n' given a matrix of transition probabilities P
simulateMarkovChain(P, n)
P |
a matrix of transition probabilities (row sums should be 1) |
n |
an integer specifying thhe length of the simulated sequence |
#Example simulateMarkovChain(matrix(c(0.99,0.01,0.01,0.99),2,2),100)