R library for discrete Markov chain simulation
Posted
by stevejb
on Stack Overflow
See other posts from Stack Overflow
or by stevejb
Published on 2010-05-02T18:23:39Z
Indexed on
2010/05/02
18:27 UTC
Read the original article
Hit count: 326
rstats
Hello,
I am looking for something like the 'msm' package, but for discrete Markov chains. For example, if I had a transition matrix defined as such
Pi <- matrix(c(1/3,1/3,1/3,
0,2/3,1/6,
2/3,0,1/2))
for states A,B,C. How can I simulate a Markov chain according to that transition matrix?
Thanks,
© Stack Overflow or respective owner