steadyState: Steady State

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/steadyState.R

Description

A function to estimate the ergodic distribution, or steady state distribution vector, of a regular first order markov process.

Usage

1
steadyState(M, tol = 1e-10)

Arguments

M

An object of class markov or class spMarkov.

tol

A tolerance argument, used in determining the steady state distribution. By default set to 1e-100.

Details

The long run behavior of a first order Markov process is governed by the unitary eigenvalues associated with the probability matrix. If an eigenvalue does not equal unity, but is very close to unity, the tolerance argument specifies the maximum gap to be tolerated to regard an eigenvalue as equal to unity. Then this eigenvalue will govern the long run behavior of the Markov process and, hence, will determine the steady state vector or ergodic distribution. The steadyState function uses the eigen function in the base package.

Value

If an object of class markov is provided, it returns a vector. If an objecto of class spMarkov is provided, it returns a matrix.

Author(s)

Osmar Leandro Loaiza Quintero

References

Restrepo, Patricia; Franco, Rosa and Munoz, Luz (2010). Algebra Lineal con Aplicaciones, Universidad Nacional de Colombia, Medellin.

See Also

spMarkov, markov, eigen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(usinc)
stateVars<-names(usinc@data[,7:87])
stateNames<-c('Poor','Lower','Middle','Upper','Rich')

##Classic Markov Matrix
Mc<-markov(usinc@data, stateVars=stateVars,n.states=5,stateNames=stateNames)
steadyState(Mc)

##Spatial Markov Matrix
#Create a list of spatial weights
require(spdep)
lw<-nb2listw(poly2nb(usinc,queen=TRUE),style='W')

Msp<-spMarkov(usinc@data, lw, stateVars=stateVars,
n.states=5,stateNames=stateNames,
pool=TRUE,std=TRUE)

steadyState(Msp)

spdyn documentation built on Feb. 6, 2021, 3 a.m.