Expected hitting time of a state in a continuous time Markov chain
Source:R/ctmcProbabilistic.R
ExpectedTime.RdExpected time for a continuous time Markov chain started in
state i to reach state j for the first time.
Details
The expected hitting times \(m_k\) of j from the states
\(k \ne j\) solve \(\sum_{l \ne j} Q_{kl} m_l = -1\) (Norris 1997,
Section 3.3). Every state other than j must have a positive exit
rate, otherwise an error is given; the times are finite only if j is
reachable from every state, otherwise the system is singular.
See also
Other continuous time Markov chains:
ctmcFit(),
freq2Generator(),
generatorToTransitionMatrix(),
impreciseProbabilityatT(),
is.CTMCirreducible(),
is.TimeReversible(),
probabilityatT(),
rctmc(),
transition2Generator()
Examples
states <- c("a", "b", "c", "d")
gen <- matrix(c(-1, 1/2, 1/2, 0,
1/4, -1/2, 0, 1/4,
1/6, 0, -1/3, 1/6,
0, 0, 0, 0), nrow = 4, byrow = TRUE,
dimnames = list(states, states))
ctmc <- new("ctmc", states = states, byrow = TRUE, generator = gen,
name = "testctmc")
ExpectedTime(ctmc, 1, 4) # from "a" to the absorbing state "d"
#> [1] 7