Learn R Programming

markovchain (version 0.8.5)

hittingProbabilities: Hitting probabilities for markovchain

Description

Given a markovchain object, this function calculates the probability of ever arriving from state i to j

Usage

hittingProbabilities(object)

Arguments

object

the markovchain-class object

Value

a matrix of hitting probabilities

References

R. V<U+00E9>lez, T. Prieto, Procesos Estoc<U+00E1>sticos, Librer<U+00ED>a UNED, 2013

Examples

Run this code
# NOT RUN {
M <- matlab::zeros(5, 5)
M[1,1] <- M[5,5] <- 1
M[2,1] <- M[2,3] <- 1/2
M[3,2] <- M[3,4] <- 1/2
M[4,2] <- M[4,5] <- 1/2

mc <- new("markovchain", transitionMatrix = M)
hittingProbabilities(mc)

# }

Run the code above in your browser using DataLab