stationary: Function to obtain the stationary distribution of a Markov...

Description Usage Arguments Value References Examples

Description

This method is used to get the stationary distribution of a finite discrete time-homogeneous Markov chain.

Usage

1
stationary(trMatrix)

Arguments

trMatrix

Transition matrix of the Markov chain

Value

A vector of stationary distribution corresponding to the Markov chain.

References

Grimmett, G., & Stirzaker, D. (2001). Probability and Random Processes (3rd ed.). New York: Oxford University Press.

Examples

1
2
3
4
5
6
egstate <- c("a", "b", "c")
MC <- matrix(data = c(1, 0, 0, 0, 1, 0, 0, 0, 1),
         nrow = 3, byrow = TRUE,
         dimnames = list(egstate, egstate))

stationary(MC)

ZiqingHo/BasicMC documentation built on May 21, 2019, 2:29 a.m.