trProb: Calculate the n-step transition matrix

Description Usage Arguments Value References Examples

Description

Function to calculate the n-step transition matrix of a finite-state discrete time-homogeneous Markov Chain.

Usage

1
trProb(trMatrix, steps)

Arguments

trMatrix

Transition matrix of the Markov chain

steps

The number of steps

Value

A matrix of n-step transition probabilities of the states

References

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

Examples

1
2
3
4
5
6
7
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))

n <- 5
trProb(MC,n)

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