This function simulates a Markov chain.
Usage
simulate_markov_chain(
Gamma,
T,
delta = Gamma2delta(Gamma),
seed = NULL,
total_length = T
)Arguments
- Gamma
A transition probability
matrix(tpm).- T
AN
integer, the length of the Markov chain.- delta
A
numericprobability vector, the initial distribution. If not specified,deltais set to the stationary distribution vector.- seed
Set a seed.
- total_length
An
integer, the total length of the output vector. Must be greater or equal thanT.
