simulateMarkovChain: Simulates a Markov Chain of length 'n' given a matrix of...

View source: R/RcppExports.R

simulateMarkovChainR 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)

plbaldoni/epigraHMM documentation built on Oct. 15, 2023, 7:53 p.m.