mc.discrete: Markov Chain Simulator

Description Usage Arguments Value Author(s) Examples

Description

This function takes 3 arguments to simulate the stationary probabilities from a transition probability matrix.

Usage

1
mc.discrete(p,k,n)

Arguments

p

is a transition probability matrix for Markov Chain simulation.

k

is a single integer number that states which state the simulation starts at.

n

is a single natural number that decides how many simulation steps is to be done.

Value

Returns a vector of values corresponding to the stationary probability for each state in the given transition probability matrix.

Author(s)

Nguyen Khanh Le Ho & Emil H. Andersen
Department of Mathematics and Computer Science (IMADA)
University of Southern Denmark, Denmark
emila14@student.sdu.dk
ngho14@student.sdu.dk

Examples

1
mc.discrete(matrix(c(0,0,0,0.4,0.7,0.5,0.6,0.3,0.5),nrow=3,ncol=3),1,100)

Chaiji/LemilExamST522 documentation built on May 6, 2019, 9:55 a.m.