simulateMarkovChain {epigraHMM}R Documentation

Simulates a Markov Chain of length 'n' given a matrix of transition probabilities P

Description

Simulates a Markov Chain of length 'n' given a matrix of transition probabilities P

Usage

simulateMarkovChain(P, n)

Arguments

P

a matrix of transition probabilities (row sums should be 1)

n

an integer specifying thhe length of the simulated sequence

Examples

#Example
simulateMarkovChain(matrix(c(0.99,0.01,0.01,0.99),2,2),100)

[Package epigraHMM version 1.2.1 Index]