# building a Q matrix for a 3-state cont.-time Markov chain
Q = generator(rep(-2, 6))
# draw random time differences
timediff = rexp(100, 10)
# compute all transition matrices
Gamma = tpm_cont(Q, timediff)
Run the code above in your browser using DataLab