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

is.irreducible {markovchain} | R Documentation

## 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

### Details

It is based on `.communicatingClasses` internal function.

### Value

A boolean values.

### Author(s)

Giorgio Spedicato

### References

Feres, Matlab listings for Markov Chains.

### See Also

`summary`

### Examples

    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)

[Package markovchain version 0.8.6 Index]