firstPassage {markovchain} | R Documentation |
First passage across states
Description
This function compute the first passage probability in states
Usage
firstPassage(object, state, n)
Arguments
object |
A |
state |
Initial state |
n |
Number of rows on which compute the distribution |
Details
Based on Feres' Matlab listings
Value
A matrix of size 1:n x number of states showing the probability of the first time of passage in states to be exactly the number in the row.
Author(s)
Giorgio Spedicato
References
Renaldo Feres, Notes for Math 450 Matlab listings for Markov chains
See Also
Examples
simpleMc <- new("markovchain", states = c("a", "b"),
transitionMatrix = matrix(c(0.4, 0.6, .3, .7),
nrow = 2, byrow = TRUE))
firstPassage(simpleMc, "b", 20)
[Package markovchain version 0.9.5 Index]