Learn R Programming

markovchain (version 0.0.7)

absorbingStates: Function to get the absorbing, transient states of a Markov chain and to put the matrix in canonic form

Description

These functions returns absorbing and transient states of the markovchain object.

Usage

absorbingStates(object)
transientStates(object)
canonicForm(object)

Arguments

object
A markovchain object.

Value

  • A matrix

References

Feres, Matlab listing for markov chain.

See Also

markovchain

Examples

Run this code
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)
                 ))
absorbingStates(markovB)
transientStates(markovB)
canonicForm(markovB)

Run the code above in your browser using DataLab