firstPassage: First passage across states

View source: R/probabilistic.R

firstPassageR Documentation

First passage across states

Description

This function compute the first passage probability in states

Usage

firstPassage(object, state, n)

Arguments

object

A markovchain object

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

conditionalDistribution

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)


markovchain documentation built on Sept. 24, 2023, 5:06 p.m.