Learn R Programming

markovchain (version 0.8.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)

Arguments

object

A markovchain object

Value

A boolean values.

Details

It is based on .communicatingClasses internal function.

References

Feres, Matlab listings for Markov Chains.

See Also

summary

Examples

Run this code
# NOT RUN {
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