stn: Find stationary distribution

Description Usage Arguments Details Value Examples

Description

Input an mc to get a vector of stationary probabilities for each markov state.

Usage

1
stn(mc, e = 0.01)

Arguments

mc

of type mc containing a defined markov chain.

e

floating point convergence criterion for infinite mc.

Details

TODO: Continuous example.

Value

The stationary distribution vector for mc.

Examples

1
2
3
4
5
6
7
8
pijdef = matrix(rep(0,9), nrow=3)
pijdef[1,1] <- 0.5
pijdef[1,2] <- 0.5
pijdef[2,3] <- 0.5
pijdef[2,1] <- 0.5
pijdef[3,1] <- 1
markov_chain = mc(pijdef)
stn(markov_chain, 0.1)

drlevy/ECS256-HW1 documentation built on May 15, 2019, 2:21 p.m.