absorb: Absorbing Markov Chain

Description Usage Arguments Details Value Author(s) Examples

Description

Finds key features of a Discrete Finite absorbing Markov Chain. Future updates will include the infinite case

Usage

1
absorb.mc(pijdef, type, tol = 1e-06, ...)

Arguments

pijdef

The transition probabilities, either in matrix form or a function For now only matrix form, until the infinite case is incorporated

type

Type of markov chain, either 'discrete' or 'continuous'.

tol

A positive scalar for error tolerance for infinite markov chain approximation.

...

Additional argument for continuous markov chain type.

Details

This function generates key features and common output for an absorbing Markov Chain. An error is returned if the input matrix is not absorbing. A Markov Chain is an absorbing chain if 1) At least one state is absorbing 2) All non-absorbing states are transient.

Value

Object of class "mc", with components

pijdef

The original transition matrix

absorb

TRUE,Confirms it is an absorbing chain

astates

absorbing states

tstates

transient states

canonicalForm

canonical form of the transition matrix

steady.state

stationary distribution

FundamentalMatrix

fundamental matrix

Qmat

Q matrix, the sub matrix of transient to transient states

Rmat

R matrix, the sub matrix of transient to absorbing states

ExpectedHits

Expected number of hits in state i before getting absorbed

AbsorbProb

A matrix of absorption probalities. Columns represent the absorbing states, rows represent transient states. The i,j entry represents the probablilty of being absorbed into absorbing state j given you are in state i

Author(s)

Teresa Filshtein <teresa.filshtein@gmail.com>,Ozan Sonmez <osonmez@ucdavis.edu>, Rex Cheung <rccheung@ucdavis.edu>, and Norm Matloff <matloff@cs.ucdavis.edu>

Examples

1
2
3
4
5
6
7
8
#Discrete Chain
#Finite state


drunkard = t(matrix(c(1,rep(0,4),.5,0,.5,0,0,0,.5,0,.5,0,0,0,.5,0,.5,
                    rep(0,4),1),nrow = 5))
absorb.mc(drunkard)$ExpectedHits
absorb.mc(drunkard)$AbsorbProb

SonmezOzan/mc_1.0.3 documentation built on May 9, 2019, 9:57 p.m.