Learn R Programming

markovchain (version 0.9.5)

is.irreducible: Function to check if a Markov chain is irreducible (i.e. ergodic)

Description

This function verifies whether a markovchain object transition matrix is composed by only one communicating class.

Usage

is.irreducible(object)

Value

A boolean values.

Arguments

object

A markovchain object

Author

Giorgio Spedicato

Details

It is based on .communicatingClasses internal function.

References

Feres, Matlab listings for Markov Chains.

See Also

Examples

Run this code
statesNames <- c("a", "b")
mcA <- new("markovchain", transitionMatrix = matrix(c(0.7,0.3,0.1,0.9),
                                             byrow = TRUE, nrow = 2, 
                                             dimnames = list(statesNames, statesNames)
           ))
is.irreducible(mcA)

Run the code above in your browser using DataLab