is.accessible: Verify if a state j is reachable from state i.

is.accessibleR Documentation

Verify if a state j is reachable from state i.

Description

This function verifies if a state is reachable from another, i.e., if there exists a path that leads to state j leaving from state i with positive probability

Usage

is.accessible(object, from, to)

Arguments

object

A markovchain object.

from

The name of state "i" (beginning state).

to

The name of state "j" (ending state).

Details

It wraps an internal function named reachabilityMatrix.

Value

A boolean value.

Author(s)

Giorgio Spedicato, Ignacio Cordón

References

James Montgomery, University of Madison

See Also

is.irreducible

Examples

statesNames <- c("a", "b", "c")
markovB <- new("markovchain", states = statesNames, 
               transitionMatrix = matrix(c(0.2, 0.5, 0.3,
                                             0,   1,   0,
                                           0.1, 0.8, 0.1), nrow = 3, byrow = TRUE, 
                                         dimnames = list(statesNames, statesNames)
                                        )
               )
is.accessible(markovB, "a", "c")


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