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. 14, 2023, 5:13 a.m.