View source: R/ctmcProbabilistic.R
transition2Generator | R Documentation |
Calculate the generator matrix for a corresponding transition matrix
transition2Generator(P, t = 1, method = "logarithm")
P |
transition matrix between time 0 and t |
t |
time of observation |
method |
"logarithm" returns the Matrix logarithm of the transition matrix |
A matrix that represent the generator of P
rctmc
mymatr <- matrix(c(.4, .6, .1, .9), nrow = 2, byrow = TRUE)
Q <- transition2Generator(P = mymatr)
expm::expm(Q)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.