Pt2 {modesto} | R Documentation |
Tool to computate the transition matrix for a Continuous Time Markov Chain, CTMC.
Description
Pt2
is used to obtain the transition matrix of a homogeneous continuous time Markov chain for a period of time of t.
Usage
Pt2(R, t, epsilon = 0.001)
Arguments
R |
numeric, represents the rate matrix of a CTMC. |
t |
numeric, represents the length of time. |
epsilon |
numeric, represents the error bound of the approximation of P(t). Default values is 0.001. |
Author(s)
Carlos Alberto Cardozo Delgado <cardozorpackages@gmail.com>.
References
Ross, S, Introduction to Probability Models, Eleven Edition. Academic Press, 2014.
Kulkarni V, Introduction to modeling and analysis of stochastic systems. Second Edition. Springer-Verlag, 2011.
Examples
library(modesto)
# A two states CTMC example
Pt2(matrix(c(0,2,3,0),2,2,byrow=TRUE),t=0.7,epsilon=0.005)
# A four states CTMC example
R <- matrix(c(0,2,3,0,4,0,2,0,0,2,0,2,1,0,3,0),4,4,byrow=TRUE)
Pt2(R,t=0.7,epsilon=0.005)
# require(microbenchmark)
# microbenchmark(Pt(R,t=0.7,epsilon=0.005),Pt2(R,t=0.7,epsilon=0.005),times=1000L)
[Package modesto version 0.1.4 Index]